コード例 #1
0
        // To protect from overposting attacks, please enable the specific properties you want to bind to, for
        // more details see https://aka.ms/RazorPagesCRUD.
        public async Task <IActionResult> OnPostAsync()
        {
            if (!ModelState.IsValid)
            {
                return(Page());
            }

            await _skillAreaRepository.UpdateAsync(SkillArea);

            return(RedirectToPage("./Index"));
        }
コード例 #2
0
ファイル: Edit.cshtml.cs プロジェクト: 95Conor/Swifty
        // To protect from overposting attacks, please enable the specific properties you want to bind to, for
        // more details see https://aka.ms/RazorPagesCRUD.
        public async Task <IActionResult> OnPostAsync()
        {
            if (!ModelState.IsValid)
            {
                PopulateSelectListsAsync();
                return(Page());
            }

            await _skillRepository.UpdateAsync(Skill);

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