Beispiel #1
0
        public async Task <int> AddUpdateAsync(AddGameplayUpdateInputModel model)
        {
            var update = new GameplayUpdate
            {
                Name    = model.Name,
                Content = model.Content,
            };

            await this.gameplayRepository.AddAsync(update);

            await this.gameplayRepository.SaveChangesAsync();

            return(update.Id);
        }
        public async Task <IActionResult> Add(AddGameplayUpdateInputModel model)
        {
            var updateId = await this.gameplayUpdatesService.AddUpdateAsync(model);

            return(this.Redirect($"/GameplayUpdates/ById/{updateId}"));
        }