public HttpResponseMessage GetById(int id) { if (id != null) { var Department = _departmentServices.GetDepartmentById(id); if (Department != null) { return(Request.CreateResponse(HttpStatusCode.OK, Department)); } throw new ApiDataException(1001, "No Department found for this id.", HttpStatusCode.NotFound); } throw new ApiException() { ErrorCode = (int)HttpStatusCode.BadRequest, ErrorDescription = "Bad Request..." }; }
public Department Query(int id) { return(_departmentServices.GetDepartmentById(id)); }
public ActionResult EditDepartment(string id) { DepartmentEntity data = _departmentservice.GetDepartmentById(Convert.ToInt64(id)); return(PartialView("_UserEdit", data)); }