public async Task <GameModel.CreateGame.Models.OutModel> CreateGame([FromBody] GameModel.CreateGame.Models.InModel inModel) { GameModel.CreateGame.Models.OutModel outModel = new GameModel.CreateGame.Models.OutModel(); outModel.IdGame = await gameService.CreateGame(inModel.IdCreatedUser, inModel.Title, inModel.Size); return(outModel); }
public void Create(string name, string description, string coverIMG, decimal price, string publisher, int year, int month, int day) { Game newGame = new Game() { Name = name, Description = description, CoverImgPath = coverIMG, Price = price, Publisher = publisher, ReleaseDate = new DateTime(year, month, day) }; _services.CreateGame(newGame); }
public ActionResult New(PlayerType playerType) { var gameKey = _gameService.CreateGame(); return(RedirectToAction(playerType == PlayerType.SpyMaster ? "SpyMaster" : "Agent", new { key = gameKey })); }