title: Execute RAW SQL on DbContext in EF Core 2.1
body: <p>I have <a href="https://docs.microsoft.com/en-us/ef/core/querying/raw-sql" rel="noreferrer">researched this</a> and always found examples like this:</p>
  
  <pre><code>var blogs = context.Blogs
      .FromSql("SELECT * FROM dbo.Blogs")
      .ToList();
  </code></pre>
  
  <p>The problem is, I don't want to run my raw SQL on the Blogs table. Basically, I want to implement an interface like this:</p>
  
  <pre><code>bool ExecuteNonSafeSql(
      string connectionString,
      string sql);
  </code></pre>
  
  <p>Is there a way to do that with DbContext?</p>