In ASP.NET Core 5 MVC, I have:
dbContext = mfdDbContext
var myquery = select * from teachers order by id desc
The normal convention is this:
var results = mfdDbContext.SomeModel
.FromSqlRaw("select id, firstName, lastName from teachers order by id desc")
.ToList();
But I don't have a model class.
How do I implement the above raw query without a model? Then generate my own model.
Thanks