Example #1
0
 public ContentItem Add(ContentItem contentItem)
 {
     using (DatabaseContext context = new DatabaseContext())
     {
         return context.AddContentItem<MSSQL.Entities.ContentItem, ContentItem>(contentItem);
     }
 }
Example #2
0
 public ContentItem Add(ContentItem contentItem)
 {
     using (DatabaseContext context = new DatabaseContext())
     {
         return(context.AddContentItem <MSSQL.Entities.ContentItem, ContentItem>(contentItem));
     }
 }
Example #3
0
        public Timeline Add(Timeline timeline)
        {
            using (DatabaseContext context = new DatabaseContext())
            {
                ContentItem contentItem = new ContentItem()
                {
                    ParentId = 1,
                    BeginDate = timeline.BeginDate,
                    EndDate = timeline.EndDate,
                    HasChildren = true,
                    Title = timeline.Title,
                    Description = timeline.Description,
                    PictureURLs = new string[1]
                };

                contentItem = context.AddContentItem<MSSQL.Entities.ContentItem, ContentItem>(contentItem);
                timeline.RootContentItemId = contentItem.Id;

                return context.Add<MSSQL.Entities.Timeline, Timeline>(timeline, new string[] { "Id", "Timestamp" });
            }
        }
Example #4
0
        public Timeline Add(Timeline timeline)
        {
            using (DatabaseContext context = new DatabaseContext())
            {
                ContentItem contentItem = new ContentItem()
                {
                    ParentId    = 1,
                    BeginDate   = timeline.BeginDate,
                    EndDate     = timeline.EndDate,
                    HasChildren = true,
                    Title       = timeline.Title,
                    Description = timeline.Description,
                    PictureURLs = new string[1]
                };

                contentItem = context.AddContentItem <MSSQL.Entities.ContentItem, ContentItem>(contentItem);
                timeline.RootContentItemId = contentItem.Id;

                return(context.Add <MSSQL.Entities.Timeline, Timeline>(timeline, new string[] { "Id", "Timestamp" }));
            }
        }