public void Delete(DeletePlayroom command) { if (Owner != default(Guid) && command.Requester != Owner) throw new DXGameException("unathorized_request"); if (command.Password != Password) throw new DXGameException("invalid_password"); ApplyEvent(new PlayroomDeleted(Id, Version, command.CommandId)); }
public async Task <IActionResult> Delete([FromBody] DeletePlayroom command) => await ProcessCommand(command);