Пример #1
0
        public async Task <IActionResult> OnPostAsync()
        {
            if (!ModelState.IsValid)
            {
                return(Page());
            }

            await _skillAreaRepository.AddAsync(SkillArea);

            return(RedirectToPage("./Index"));
        }
Пример #2
0
        public async Task <IActionResult> OnPostAsync()
        {
            if (!ModelState.IsValid)
            {
                await PopulateSelectListsAsync();

                return(Page());
            }

            await _skillRepository.AddAsync(Skill);

            return(RedirectToPage("./Index"));
        }