请教一个sql语句转换成linq
select * from Product where left(dbo.f_GetPy(p_name),1)='A' or p_id=1这个sql语句怎么转成Linq求教。谢谢大家
------解决方案--------------------
var v= from a in db.Product where GetPy(a.p_name)[0]=='A' && a.p_id==1 select a
不过dbo.f_GetPy,你要自己写个函数吧,返回拼音字符串
------解决方案--------------------
var source = from temp in db.Product where temp.p_name[0] == 'A' || temp.p_id == 1 select temp;