Beispiel #1
0
        public ActionResult Create(FormCollection collection)
        {
            var model = new Channel();
            this.TryUpdateModel<Channel>(model);

            this.CmsService.SaveChannel(model);

            return this.RefreshParent();
        }
Beispiel #2
0
 public void SaveChannel(Channel channel)
 {
     using (var dbContext = new CmsDbContext())
     {
         if (channel.ID > 0)
         {
             dbContext.Update<Channel>(channel);
         }
         else
         {
             dbContext.Insert<Channel>(channel);
         }
     }
 }
Beispiel #3
0
        //
        // GET: /Cms/Channel/Create

        public ActionResult Create()
        {
            var model = new Channel() { IsActive = true };
            return View("Edit", model);
        }