I ran into the following error today while attempting to use a raw query with entity framework:
I was using FromQuery, and while I’m not too sure what was causing the issue, switching to SqlQuery resolved it:
var carList = resp.Db.Cars.FromSql(“SELECT * FROM cars”);
var carList = resp.Db.Cars.SqlQuery(“SELECT * FROM cars”);
Hopefully that’s able to help out anyone else with the issue.