public GameDescriptor PutOneGame([FromBody] GameDescriptor descriptor) { GameDescriptor validatedDescriptor = new GameDescriptor(descriptor); lobbyHub.Clients.All.SendAsync("InformGameCreated", validatedDescriptor); return(GameAccessor.SaveGame(validatedDescriptor).Result); }
public async Task RequestGameCreation(GameDescriptor descriptor) { GameDescriptor validatedDescriptor = new GameDescriptor(descriptor); await Task.WhenAll( GameAccessor.SaveGame(validatedDescriptor), InformGameCreated(validatedDescriptor)); }