Example #1
0
        public async Task <IActionResult> Create(GroupsViewModel groupsViewModel)
        {
            if (ModelState.IsValid)
            {
                groupsViewModel.UsuarioId = 1;
                await _groupsService.AddGroupsAsync(groupsViewModel);

                return(RedirectToAction(nameof(Index)));
            }
            return(View(groupsViewModel));
        }