I am trying to run custom query and I am using Entity framework, I tried this
string query = @"SELECT dm.DistrictName,sm.SchoolName,u.UserId,u.FirstName,u.LastName, sa.StudentId, sa.ReadingLevel
FROM studentassessment sa
INNER JOIN assessmentmaster am ON sa.AssessmentId = am.AssessmentId
INNER JOIN studentclass sc ON sa.StudentId = sc.StudentId
INNER JOIN USER u ON sc.TeacherId = u.UserId
INNER JOIN schoolmaster sm ON u.SchoolCode = sm.SchoolCode
INNER JOIN districtmaster dm ON sm.DistrictId = dm.DistrictId
WHERE u.RoleId = 5 && sa.GradeId = " + objParam.Grade + " && sa.AssessmentPeriodId = " + x.AssessmentPeriodId + " && dm.DistrictId = " + districtCode + " && am.DRAType = '" + objParam.LanguageType + "' && am.AssessmentTypeId = 1";
var dt = db.ExecuteStoreQuery<List<object>>(query).FirstOrDefault();
But didn't get succeed.
Is there any way to get results from ExecuteStoreQuery
in the structure not mapped to any object type?