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