in my class i have a property with name “from” but i can’t use it in my linq statement ?
is there any solution or i have to change my property name ?
lst1 = (from p in db.adv where p.isShowInMainPage && p.isShowInHeader && (p.from <= DateTime.Now) orderby p.id descending select p);
lst2= (from p in db.adv where p.isShowInMainPage && !p.isShowInHeader orderby p.id descending select p);
when i use p.from compile error occure :
Error 14 ; expected
in the SQL we could use [] ([from]) . is there any similar thing in LINQ
At (@from) in the beginning should work in C#, in VB.NET you use [from]