Exemple #1
0
        public async Task <ApiResponse> DeleteInventory([FromBody] DeleteInventoryCommand command)
        {
            var userId = User.FindFirst(ClaimTypes.NameIdentifier).Value;

            command.ModifiedById = userId;
            command.ModifiedDate = DateTime.UtcNow;
            return(await _mediator.Send(command));
        }
        public async Task <IActionResult> DeleteInventory([FromRoute] DeleteInventoryCommand command)
        {
            await _mediator.Send(command);

            return(NoContent());
        }
        public async Task DeleteInventory(DeleteInventoryCommand command)
        {
            var result = await _set.FindAsync(command.Id).ConfigureAwait(false);

            _set.Remove(result);
        }