21 May 2015

Sql Query vs Linq to Sql Query VS Entity Query

select NAME as names from dbo.MASTER where NAME like '%value%'


IList<string> names = (from OM in dbo.MASTER where OM.NAME.Contains("value") select OM.NAME).ToList<string>();


IList<string> names = dbo.MASTER.Where(x => x.NAME.Contains("value")).Select(x => x.NAME).ToList<string>();

No comments: