public async Task <IActionResult> Edit(int id, [Bind("Id,Language,ResourceKey,ResourceText")] NsresourcesT nsresourcesT) { if (id != nsresourcesT.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(nsresourcesT); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!NsresourcesTExists(nsresourcesT.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(nsresourcesT)); }
public async Task <IActionResult> Create([Bind("Id,Language,ResourceKey,ResourceText")] NsresourcesT nsresourcesT) { if (ModelState.IsValid) { _context.Add(nsresourcesT); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(nsresourcesT)); }