public async Task DeleteListingAsync(long listingId)
        {
            var command = new DeleteListingCommand
            {
                ListingId = listingId
            };

            await pipelineService.HandleCommandAsync(command);
        }
Exemple #2
0
 /// <summary>
 /// Delete listing command handler async.
 /// </summary>
 /// <param name="listingCommand">Delete listing command.</param>
 /// <param name="listingRepository">Listing repository.</param>
 public async Task HandleDeleteListingAsync(DeleteListingCommand listingCommand)
 {
     await listingRepository.DeleteListingAsync(listingCommand.ListingId);
 }
 public async Task <ActionResult <bool> > Delete([FromRoute] DeleteListingCommand command) => await Send(command);