// GET: FeedDefinitions/Details/5
        public ActionResult Details(int?id)
        {
            if (id.HasValue == false)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }

            FeedDefinition feedDefinition = repo.Find(id.Value);

            if (feedDefinition == null)
            {
                return(HttpNotFound());
            }

            return(View(feedDefinition.ToViewModel()));
        }
Ejemplo n.º 2
0
        public static ChannelBindingModel Create(int feedDefinitionId, FeedDefinitionRepository fdRepo)
        {
            var feedDefinition = fdRepo.Find(feedDefinitionId);

            return(new ChannelBindingModel()
            {
                FeedDefinitionID = feedDefinitionId,
                Title = feedDefinition.Title
            });
        }