コード例 #1
0
 public OfferController(IGetOfferByIdCommand getOfferByAdIdCommand,
                        UserManager <ApplicationUser> userManager,
                        ICreateOfferCommand createOfferCommand,
                        IGetOfferCommand getAllUserOffers,
                        IDeleteOfferCommand deleteOfferCommand)
 {
     _getOfferByAdIdCommand = getOfferByAdIdCommand;
     _userManager           = userManager;
     _createOfferCommand    = createOfferCommand;
     _getAllUserOffers      = getAllUserOffers;
     _deleteOfferCommand    = deleteOfferCommand;
 }
コード例 #2
0
 public OfferController(
     ICreateOfferCommand createOfferCommand,
     UserManager <ApplicationUser> userManager,
     IDeleteOfferCommand deleteOfferCommand,
     IEditOfferCommand editOfferCommand,
     IGetOfferCommand getOfferCommand
     )
 {
     _createOfferCommand = createOfferCommand;
     _userManager        = userManager;
     _deleteOfferCommand = deleteOfferCommand;
     _editOfferCommand   = editOfferCommand;
     _getOfferCommand    = getOfferCommand;
 }
コード例 #3
0
 public Task <IActionResult> Get(
     [FromServices] IGetOfferCommand command,
     Guid offerId,
     CancellationToken cancellationToken) => command.ExecuteAsync(offerId);