I am using the following query. It returns 5 rows in a list but all the elements in the list are null.
public class TempClass
{
public int SID { get; set; }
public string SNAME { get; set; }
public string SAGE { get; set; }
}
var i = _dbContext.Database
.SqlQuery<TempClass>("select ID, NAME, AGE from eis_hierarchy")
.ToList();
What I am doing wrong?