public async Task <IActionResult> OnPostAsync() { if (!ModelState.IsValid) { return(Page()); } _context.Attach(TelegramEntity).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!TelegramEntityExists(TelegramEntity.ID)) { return(NotFound()); } else { throw; } } return(RedirectToPage("../Telegram")); }
// To protect from overposting attacks, 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()); } _context.Attach(BitrixUser).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!BitrixUserExists(BitrixUser.Id)) { return(NotFound()); } else { throw; } } return(RedirectToPage("/Account/Manage/Bitrix", new { area = "Identity" })); }