public GenericCommandResult Update( [FromBody] UpdateLeilaoCommand command, [FromServices] LeilaoHandler handler ) { command.User = User.Claims.FirstOrDefault(x => x.Type == "user_id")?.Value; return((GenericCommandResult)handler.Handle(command)); }
public GenericCommandResult Delete( long id, [FromServices] LeilaoHandler handler ) { var command = new DeleteLeilaoCommand(); command.User = User.Claims.FirstOrDefault(x => x.Type == "user_id")?.Value; command.Id = id; return((GenericCommandResult)handler.Handle(command)); }