public async Task <IActionResult> Edit(int id, [Bind("Id,Name,Audio,Image,Answeres,CorrectAnswer,SerieId")] Question question) { if (id != question.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(question); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!QuestionExists(question.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(question)); }
public void Update(T data) => m_context.Update((object)data);