Esempio n. 1
0
        static void AddData()
        {
            Stories story = new Stories()
            {
                Name  = "Life of Steve Jobs",
                Story = "Steve jobs was a frutitarian"
            };

            Stories.Add(story);

            story = new Stories()
            {
                Name  = "The Creation of Apple",
                Story = "Apple was created in 1976"
            };
            Stories.Add(story);

            story = new Stories()
            {
                Name  = "The Legend of Steve Jobs",
                Story = "Steve Jobs Was CEO of Apple"
            };

            Stories.Add(story);

            Comment comment = new Comment()
            {
                AStoriesComments = "Super generic comment"
            };

            story.Comments.Add(comment);

            Comment newComment = new Comment()
            {
                AStoriesComments = "A Random Comment"
            };

            story.Comments.Add(newComment);
        }
Esempio n. 2
0
 public static void AddStory(Stories story)
 {
     stories.Add(story);
 }
Esempio n. 3
0
        public static Stories GetStoryByName(string name)
        {
            Stories story = stories.Find(s => s.Name == name);

            return(story);
        }