Beispiel #1
0
 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));
 }
Beispiel #2
0
        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));
        }