public bool UpdateDepartment(int Id, TB_M_Department Department) { var Get = get(Id); if (Get != null) { Get.Name = Department.Name; myContext.Entry(Get).State = EntityState.Modified; return(savedata.Save(myContext)); } else { status = false; } return(status); }
public bool InsertDepartment(TB_M_Department Department) { myContext.TB_M_Departments.Add(Department); return(savedata.Save(myContext)); }