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