public async Task <IActionResult> Edit(int id, [Bind("AutoId,TableName,ColumnName,AliasName,ViewSerial")] TblMapViewConfig tblMapViewConfig) { if (id != tblMapViewConfig.AutoId) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(tblMapViewConfig); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!TblMapViewConfigExists(tblMapViewConfig.AutoId)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(tblMapViewConfig)); }
public async Task <IActionResult> Create([Bind("AutoId,TableName,ColumnName,AliasName,ViewSerial")] TblMapViewConfig tblMapViewConfig) { if (ModelState.IsValid) { _context.Add(tblMapViewConfig); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(tblMapViewConfig)); }