C# LINQ Update using multiple where

We can use LINQ update using more than one where.

  // Upadate PR_RECIVEDINVOICEs status  
         var users = from u in dataContextObj.PR_RECIVEDINVOICEs  
               where u.RecivedInvoice_PublisherInvoice == receiveBook.InvoiceNo && u.Status=="Order"  
               select u;  
         users.ToList().ForEach(u => u.Status = "Book Receive");  
         dataContextObj.SubmitChanges();  

Popular posts from this blog

WPF Crystal Report Viewer Using SAP

ASP.NET MVC razor SAP Crystal report