コード例 #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));
     }
 }
コード例 #2
0
 public void Handle(CreateRentCommand command)
 {
     _RentService.Create(command.Rent);
     _RentService.Complete();
 }