Esempio n. 1
0
 public override IActionResult Post([FromBody] CreateRentDto value)
 {
     try
     {
         var dto = _service.Create(value);
         return(Ok(dto));
     }
     catch (AppException ex)
     {
         return(BadRequest(ex.Message));
     }
 }
 public void Handle(CreateRentCommand command)
 {
     _RentService.Create(command.Rent);
     _RentService.Complete();
 }