public async Task <IActionResult> OnPostEditAsync(Guid id)
        {
            if (!ModelState.IsValid)
            {
                return(Page());
            }
            if ((await _elementRepository.Find(id) != null))
            {
                return(RedirectToPage("Edit", new { id = id }));
            }

            return(Page());
        }
Esempio n. 2
0
 private async Task GetEditElement(Guid id)
 {
     EditElement = await _elementRepository.Find(id);
 }