Exemplo n.º 1
0
 public async Task <ActionResult <CarWashServiceShortModel> > UpdateCarWashServicePrice(int serviceId, [FromBody] CarWashServiceModel model) => await Exec(async operation =>
 {
     VerifyUser(UserRole.Company);
     if (!ModelState.IsValid)
     {
         throw new Exception(ExceptionMessage.ModelIsInvalid);
     }
     var service = await companyProfileService.UpdateCarWashService(operation, model.ToEntity(serviceId));
     return(new CarWashServiceShortModel().ToModel(service));
 });