// Declare an instance of IContentService IContentService contentService = new ContentService(); // Create a new blog post BlogPost post = new BlogPost() { Title = "My First Blog Post", Content = "Lorem ipsum dolor sit amet...", Author = "John Doe", PublishDate = DateTime.Now }; // Call the CreateContent method and pass in the new blog post object contentService.CreateContent(post);
// Declare an instance of IContentService IContentService contentService = new ContentService(); // Create a new product page ProductPage product = new ProductPage() { Name = "My Awesome Product", Description = "Lorem ipsum dolor sit amet...", Price = 100.00, SKU = "123-456-789" }; // Call the CreateContent method and pass in the new product page object contentService.CreateContent(product);In this example, we create a new product page object and pass it to the CreateContent method of the IContentService interface. The package library for this example would depend on the implementation of the ContentService class.