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

Popular posts from this blog

wordpress - (T_ENDFOREACH) php error -

Export Excel workseet into txt file using vba - (text and numbers with formulas) -

Using django-mptt to get only the categories that have items -