Linq to Sql First() Not work -


this :

dbmodal.sm_sys_globals.first(x => x.objectvalue.contains("to")) 

has error :

expression cannot contain lambda expressions 

use following instead

dbmodal.sm_sys_globals.where(x => x.objectvalue.contains("to")).first()


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -