I have a simple query that I'm trying to execute:
sql = "SELECT DailyGamingID, GamingDate, LocationID FROM tblDailyGaming WHERE GamingDate >= '1/1/23' AND LocationID = 1";
List<TestData> testList = context.Database.SqlQuery<TestData> (sql).ToList ();
The query returns 10 rows.
I also have the following class:
public class TestData
{
public int DailyGamingID;
public DateTime GamingDate;
public int LocationID;
}
testList will have the correct number of elements (10) in the list but none of the values of TestData have been set. They are all default values. Help please!