Пример #1
0
        public ActionResult Create(Video video)
        {
            if (ModelState.IsValid)
            {
                db.Videos.Add(video);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(video));
        }
Пример #2
0
 public void Save()
 {
     db.SaveChanges();
 }