public async Task <IActionResult> Edit(int id, [Bind("ID,ObjectName,ObjectType,ActionName,FullControllerName,ObjectDescription")] Authorization_Object authorization_Object) { if (id != authorization_Object.ID) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(authorization_Object); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!authorization_ObjectExists(authorization_Object.ID)) { return(NotFound()); } else { throw; } } return(RedirectToAction("Index")); } return(View(authorization_Object)); }
public async Task <IActionResult> Create([Bind("ID,ObjectName,ObjectType,ActionName,FullControllerName,ObjectDescription")] Authorization_Object authorization_Object) { if (ModelState.IsValid) { _context.Add(authorization_Object); await _context.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(authorization_Object)); }