Monday, March 22, 2010

update record using LINQ programmtically in c#

objNewsMast = NewsMasts.SingleOrDefault(Rec => Rec.NewsMastKey == 2);
            if (objNewsMast != null)
            {
               
                    objNewsMast.Dsc = "Today News";
                    objNewsMast.Title = "Latest News";
                    objNewsMast.Ext = "Mpg";
                    objeDC.SubmitChanges();

            }