Ejemplo n.º 1
0
        public async Task <IActionResult> Create(TeamsFormModel model)
        {
            await this.teams.CreateAsync(model.TeamName);

            return(RedirectToAction(
                       nameof(Web.Controllers.HomeController.Index),
                       "News",
                       new { area = string.Empty }));
        }
Ejemplo n.º 2
0
        public async Task <IActionResult> Edit(TeamsFormModel model)
        {
            await this.teams.EditAsync(model.Id, model.TeamName);

            TempData.AddSuccessMessage($"Role {model.TeamName} successfully edited!");

            return(RedirectToAction(
                       nameof(Web.Controllers.NewsController.Index),
                       "News",
                       new { area = string.Empty }));
        }