Menu ▼

Previous Next

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
Previous Next




Search dotnetlearners.com