public async Task <IActionResult> Edit(int id, [Bind("TVSId,Brand,ModelNumber,SerialNumber,Size,Quality,HDR,OLED,QLED,LED,ContrastLevels,Price,Hrz,BitRate")] TVS tVS) { if (id != tVS.TVSId) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(tVS); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!TVSExists(tVS.TVSId)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(tVS)); }
public async Task <IActionResult> Create([Bind("TVSId,Brand,ModelNumber,SerialNumber,Size,Quality,HDR,OLED,QLED,LED,ContrastLevels,Price,Hrz,BitRate")] TVS tVS) { if (ModelState.IsValid) { _context.Add(tVS); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(tVS)); }