public async Task <JsonResult> UpdateAsync(int id, UpdateHospitalDepartmentRequest updated)
        {
            updated.Id = id;
            var data = await _mediator.ToPipeAsync <UpdateHospitalDepartmentRequest, HospitalDepartment>(updated);

            return(Json(data));
        }
 public async Task <HospitalDepartment> UpdateAsync(UpdateHospitalDepartmentRequest updated)
 {
     return(await _mediator.RequestAsync <UpdateHospitalDepartmentRequest, HospitalDepartment>(updated));
 }