I use
dotnet ef dbcontext scaffold
to get a DbContext
; add, update, and delete are all OK.
But I want use raw SQL queries, like this:
var blogs = context.Blogs.FromSqlRaw("SELECT \* FROM dbo.Blogs").ToList();
but my DbContext doesn't have this FromSqlRaw
method
How to correct this error?
Sounds like you're missing a using
.
using Microsoft.EntityFrameworkCore;