When you write any coding like ToString() in linq code will fail. for example
var query = from p in ctx.Employee where p.empno == intEmpno.Tostring() select p;
this will give error because of the tostring() conversion. so, avoid this type of conversion coding while writing linq to entity. alternatively you can modify the above code as
string strEmpno = intEmpno.Tostring();
var query = from p in ctx.Employee where p.empno == strEmpno select p;
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment