linq - How does c# interpret my query? -
why does:
var allshapes = _context.attributevalueslibraries.where(x => x.attnameid.equals(1)).select(y => y);
work, error "unable create constant value of type 'system.object'. primitive types or enumeration types supported in context" when exclude select() like:
var allshapes = _context.attributevalueslibraries.where(x => x.attnameid.equals(1));
is there way write query makes more sense? played query make work.
thanks in advance!
try this:
var allshapes = _context.attributevalueslibraries.where(x => x.attnameid == 1);
it depends on linq provider.
Comments
Post a Comment