Exemple #1
0
        public ActionResult Create(Tag tag)
        {
            try
            {
                if (ModelState.IsValid)
                {
                    repo.Add(tag);
                    return RedirectToAction("Index");
                }
            }
            catch
            {

            }
            return View(tag);
        }
 public void Edit(Tag item)
 {
     _db.Entry(item).State = EntityState.Modified;
     _db.SaveChanges();
 }
 public void Add(Tag item)
 {
     _db.Entry(item).State = EntityState.Added;
     _db.SaveChanges();
 }