public int CreateExam(Test test) { _context.Database.EnsureCreated(); _context.Tests.Add(test); int insertResult = _context.SaveChanges(); return(insertResult); }
public IActionResult Delete(int id) { var article = _wired.GetById(id); _context.Tests.Remove(article); _context.SaveChanges(); return(RedirectToAction("Index")); }