I call some date in my database using entity frame work. but My below code giving this error
LINQ to Entities does not recognize the method \'SchoolBreifcase
It's about the compliance[i].ComplianceId. Create a variable first:
compliance[i].ComplianceId
var id = compliance[i].ComplianceId; financialCompliance = datamodel.FinancialCompliances .Where(f => f.ComplianceId == id).SingleOrDefault();