public IActionResult UpdateDepartment(int Id, Department department) { var updateDepartmentFromRepo = _repository.GetDepartmentById(Id); if (updateDepartmentFromRepo == null) { return(NotFound()); } _repository.UpdateDepartment(updateDepartmentFromRepo); _repository.SaveChanges(); return(NoContent()); }
public IHttpActionResult UpdateDepartment(DepartmentModel model) { var data = packingType.UpdateDepartment(model); return(Ok(data)); }