public Response <DepartmentDto> Post(DepartmentDto departmentDto) { Response <DepartmentDto> response = new Response <DepartmentDto>(); try { AssetContext assetContext = new AssetContext(); response.Item = assetContext.SaveDepartment(departmentDto); // Configure the Success response. response.Code = OperationCode.ResponseCode.SUCCESS; response.MessageList.Add(MessageResource.GetInstance().GetText("SawDAL_UpdateSuccess", MESSAGE_RESOURCE)); } catch (Exception ex) { response.Code = OperationCode.ResponseCode.ERROR; response.ErrorList.Add(MessageResource.GetInstance().GetText("SawDAL_UpdateInvalid", MESSAGE_RESOURCE)); } return(response); }