public async Task <IActionResult> Edit(int id, [Bind("Id,Name,Logo,RedirectUrl,Description,CreatedAt,UpdatedAt,DeletedAt,Status")] RegisterApplication registerApplication) { if (id != registerApplication.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(registerApplication); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!RegisterApplicationExists(registerApplication.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(registerApplication)); }
public async Task <IActionResult> Create([Bind("Id,Name,Logo,RedirectUrl,Description")] RegisterApplication registerApplication) { if (ModelState.IsValid) { _context.Add(registerApplication); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(registerApplication)); }