Esempio n. 1
0
        public async Task <IActionResult> OnPostAddWord(AddWordDTO addWordDTO)
        {
            if (!ModelState.IsValid)
            {
                Words = await _wordsRepository.GetWords();

                return(Page());
            }

            await _wordsRepository.AddWord(addWordDTO);

            return(RedirectToPage("/Vocabulary"));
        }