public static Story From(this Story story, NewStoryModel @new) { story.Text = @new.Text; if (@new.Rank.HasValue) story.Rank = @new.Rank.Value; return story; }
// GET: Home public ActionResult Index() { NewStoryModel newsStory = new NewStoryModel() { Headline = "Phew what a scorcher", ByLine = "Ron Journo", Content = "People are obsessed with the weather" }; return(View(newsStory)); }