public TEntity Create(TEntity item) { var result = _dbSet.Add(item); _context.SaveChanges(); return(result.Entity); }
public ActionResult Create([Bind(Include = "ID,word")] Search search) { if (ModelState.IsValid) { db.Searchs.Add(search); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(search)); }