public ActionResult Edit([Bind(Include = "Id,Name")] Destination destination) { if (ModelState.IsValid) { db.Entry(destination).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(destination)); }
public bool Add(TEntity entity) { _dbSet.Add(entity); return(Context.SaveChanges() > 0); }