示例#1
0
        //     return createdUserResponseModel;
        public async Task <CabTypesResponseModel> UpdateCab(UpdateCabTypeRequestModel updateRequestModel)
        {
            var cab = new CabTypes
            {
                Id   = updateRequestModel.Id,
                Name = updateRequestModel.Name
            };

            var updatedCab = await _cabRepository.UpdateAsync(cab);

            var updatedCabResponseModel = new CabTypesResponseModel()
            {
                Id   = updatedCab.Id,
                Name = updatedCab.Name
            };

            return(updatedCabResponseModel);
        }
        public async Task <IActionResult> UpdateCab(UpdateCabTypeRequestModel model)
        {
            var updatedCab = await _cabTypesService.UpdateCab(model);

            return(Ok(updatedCab));
        }