Beispiel #1
0
        public ActionResult Create()
        {
            var videoCreate = new VideoCreate(Server);

            PopulateUserIds();

            return View(videoCreate);
        }
Beispiel #2
0
        public ActionResult Create(VideoCreate videoCreate)
        {
            videoCreate.Validate(this);

            if (ModelState.IsValid)
            {
                int[] userIds;
                Video video = videoCreate.GetModel(out userIds);
                VideoCache.Insert(Db, video, userIds);
                return RedirectToAction("Index");
            }

            PopulateUserIds(videoCreate.UserIds);

            return View(videoCreate);
        }