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()); }
private async Task GetEditElement(Guid id) { EditElement = await _elementRepository.Find(id); }