I was having the error :
"Unknown column 'Extent1.Name' in 'where clause'"
The code was:
var companies = (from cp in skydeskDB.Companies
where cp.OrganizationId == parameters.OrganizationId
&& cp.Name.Contains(parameters.Filter)
select cp
).OrderBy(cp => cp.Name);
the solution was changing select cp to select new { cp } :
var companies = (from cp in skydeskDB.Companies
where cp.OrganizationId == parameters.OrganizationId
&& cp.Name.Contains(parameters.Filter)
select new { cp } // here
).OrderBy(cp => cp.Name);
"Unknown column 'Extent1.Name' in 'where clause'"
The code was:
var companies = (from cp in skydeskDB.Companies
where cp.OrganizationId == parameters.OrganizationId
&& cp.Name.Contains(parameters.Filter)
select cp
).OrderBy(cp => cp.Name);
the solution was changing select cp to select new { cp } :
var companies = (from cp in skydeskDB.Companies
where cp.OrganizationId == parameters.OrganizationId
&& cp.Name.Contains(parameters.Filter)
select new { cp } // here
).OrderBy(cp => cp.Name);
No comments:
Post a Comment