Sometimes we require to use In or Not in operator in LINQ. below is the example var setToRemove = “Approved,Rejected”.Split(‘,’); inv.StatusList = context.BindDropDown(fieldName:…
Category: Linq
DateTime? FromDate = TempData[“FromDate”] as DateTime?; DateTime? ToDate = TempData[“ToDate”] as DateTime?; int? UserIdInv = TempData[“UserIdInv”] as int?;
Linq can be implemented in array with c#, below is code example of linq with array. var GroupCount = Request.QueryString[“AllchkIDs”].ToString().Split(‘,’).Where(i => i !=…
Sometime it requires to update multiple records in List using linq, previous process was for loop, but using below example using linq ,…
It requires to get group by with sum. var amount = plod.objProduct.Where(i => i.SID == nslres.SID).GroupBy(s => s.SID).Select(x => new { Totamt =…
some time it requires to update multiple record using linq , for selecting single value you have to use Dirstdefault() , but for…