How can the foll. sql be written in Linq. I am using LinqToEntities,C#.
@companyID & @branchID are the parameters
select * from tblEmp e
where e.deleted = 0 and
(e.companyId = @companyID OR e.companyid is null) and
(e.branchId = @branchID OR e.branchid is null)
For now, there is a stored procedure for the same and I am using it in linq
var qry = from d in MYDB.GetData(int companyid, int branchid)
//all reqd. columns...
so, is it possible to write the above in Linq, directly.