LINQ to SQL Update

Input tables

Department table
insert


LINQ Query:

MyDBDataContext sqlObj = new MyDBDataContext(); tblDepartment dept = sqlObj.tblDepartments.Single(x => x.DepartmentID == 5); dept.DepartmentName = "Deployment Department"; sqlObj.SubmitChanges();

Output:

update