public static FeedDefinition ToFeedDefinition(this FeedDefinitionBindingModel model)
        {
            var fd = Create();

            fd.ID    = model.ID;
            fd.Title = model.Title;
            return(fd);
        }
 public ActionResult Edit(FeedDefinitionBindingModel bindingModel)
 {
     if (ModelState.IsValid)
     {
         var feedDefinition = bindingModel.ToFeedDefinition();
         repo.Update(feedDefinition);
         return(RedirectToAction("Index"));
     }
     return(View(bindingModel));
 }
        public ActionResult Create(FeedDefinitionBindingModel model)
        {
            if (ModelState.IsValid)
            {
                var feedDefinition = model.ToFeedDefinition();
                repo.Create(feedDefinition);
                return(RedirectToAction("Index"));
            }

            return(View(model));
        }