public async Task <UpdateDepartmentRes> UpdateDepartment(UpdateDepartmentReq request)
        {
            DynamicParameters parameters = new DynamicParameters();

            parameters.Add("@DepartmentId", request.DepartmentId);
            parameters.Add("@DepartmentName", request.DepartmentName);
            parameters.Add("@IsActive", request.IsActive);
            parameters.Add(name: "@Message", "", DbType.String, ParameterDirection.Output);

            using (var result = SqlMapper
                                .QueryFirstOrDefaultAsync <Department>(cnn: connection,
                                                                       sql: "sp_UpdateDepartment",
                                                                       param: parameters,
                                                                       commandType: CommandType.StoredProcedure))


            {
                UpdateDepartmentRes editRes = new UpdateDepartmentRes();
                editRes.Department = await result;
                editRes.Message    = parameters.Get <string>("@Message");
                return(editRes);
            }
        }
 public async Task <UpdateDepartmentRes> UpdateDepartment(UpdateDepartmentReq request)
 {
     return(await _departmentRepository.UpdateDepartment(request));
 }
 public async Task <IActionResult> UpdateOrangization(UpdateDepartmentReq request)
 {
     return(Ok(await _departmentServices.UpdateDepartment(request)));
 }