public async Task <IActionResult> Edit(int id, [Bind("KtixPosUseTypeId,Name")] Ktixposusetype ktixposusetype) { if (id != ktixposusetype.KtixPosUseTypeId) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(ktixposusetype); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!KtixposusetypeExists(ktixposusetype.KtixPosUseTypeId)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(ktixposusetype)); }
public async Task <IActionResult> Create([Bind("KtixPosUseTypeId,Name")] Ktixposusetype ktixposusetype) { if (ModelState.IsValid) { _context.Add(ktixposusetype); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(ktixposusetype)); }