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