public async Task <IActionResult> OnPostAsync() { if (!ModelState.IsValid) { return(Page()); } _context.Attach(AssistenciasPRM).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!AssistenciasPRMExists(AssistenciasPRM.ID)) { return(NotFound()); } else { throw; } } return(RedirectToPage("./Index")); }
public async Task <IActionResult> OnPostAsync() { if (!ModelState.IsValid) { return(Page()); } //string emailAddress = String.ToUpper(Request.Form["Formacao.FormacaoNome"].ToString()); _context.Attach(Formacao).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!FormacaoExists(Formacao.FormacaoId)) { return(NotFound()); } else { throw; } } return(RedirectToPage("./Index")); }