コード例 #1
0
 public async Task <ActionResult> AddCar([FromBody] CarModel model) => await Exec(async operation =>
 {
     var(_, id) = VerifyUser(UserRole.Client);
     if (!ModelState.IsValid)
     {
         throw new Exception(ExceptionMessage.ModelIsInvalid);
     }
     await clientProfileService.AddCar(operation, id, model.ToEntity());
 });