示例#1
0
        private void CreateBlogBPage()
        {
            var result = SampleUtilities.CreatePage(new Guid(BlogBPageId), "Blog B");

            if (result)
            {
                SampleUtilities.SetTemplateToPage(new Guid(BlogBPageId), new Guid(SamplesTemplateId));

                var templateKey = SampleUtilities.GetControlTemplateKey(typeof(MasterPostsView), "Titles, dates and summaries");
                SampleUtilities.RegisterBlogPostsFrontendView("BlogPostsFrontend", templateKey, typeof(MasterPostsView), "BlogPostsFrontendBlogList");

                var blogsControl = new BlogPostView();
                blogsControl.MasterViewName = "BlogPostsFrontendBlogList";
                var parent = new List <Guid>()
                {
                    new Guid(SampleBlogBId)
                };
                ((IContentViewMasterDefinition)blogsControl.ControlDefinition.Views[blogsControl.MasterViewName]).ItemsParentsIds = parent;

                SampleUtilities.AddControlToPage(new Guid(BlogBPageId), blogsControl, "Content", "Blog B View");

                // save default page for blog posts
                App.WorkWith().Blog(new Guid(SampleBlogBId)).Do(b => b.DefaultPageId = new Guid(BlogBPageId)).SaveChanges();
            }
        }
示例#2
0
        private void CreateSampleWorker(object[] args)
        {
            SampleUtilities.RegisterFormWidget("DatePickerWidget", typeof(DatePickerField), "Samples");
            SampleUtilities.RegisterTheme(SamplesThemeName, SamplesThemePath);
            SampleUtilities.RegisterTemplate(new Guid(SamplesTemplateId), SamplesTemplateName, SamplesTemplateName, SamplesTemplatePath, SamplesThemeName);

            var result = SampleUtilities.CreatePage(new Guid(DatePickerFormWidgetPageId), DatePickerFormWidgetPageName, true);

            if (result)
            {
                SampleUtilities.SetTemplateToPage(new Guid(DatePickerFormWidgetPageId), new Guid(SamplesTemplateId));

                var controls = new Dictionary <Control, string>();

                DatePickerField dateField = new DatePickerField();
                dateField.Title = "Date:";

                controls.Add(dateField, "Body");

                FormSubmitButton submitButton = new FormSubmitButton();
                submitButton.Text = "Submit";

                controls.Add(submitButton, "Body");

                SampleUtilities.CreateForm(new Guid(DatePickerFormId), "SampleForm", "Sample Form", "Form submitted successfully. Thank you!", controls);

                FormsControl form = new FormsControl();
                form.FormId = new Guid(DatePickerFormId);

                SampleUtilities.AddControlToPage(new Guid(DatePickerFormWidgetPageId), form, "Content", "Forms Control");
            }
        }
示例#3
0
        private void CreateAboutUsPage()
        {
            var result = SampleUtilities.CreatePage(new Guid(AboutUsPageId), "About Us");

            if (result)
            {
                SampleUtilities.SetTemplateToPage(new Guid(AboutUsPageId), new Guid(SamplesTemplateId));

                var titleContentBlock = new ContentBlockBase();
                titleContentBlock.Html = "<h1>About Us</h1>";

                SampleUtilities.AddControlToPage(new Guid(AboutUsPageId), titleContentBlock, "Content", "Content block");

                var overviewContentBlock = new ContentBlockBase();
                overviewContentBlock.Html = @"<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur sed ligula 
										vitae est posuere congue sed pretium quam. Pellentesque at velit in massa ornare 
										sagittis at in lacus. Fusce placerat leo eu sem sagittis posuere. Cras a arcu nec 
										turpis pulvinar vehicula. Proin sed metus nec leo rutrum mattis vel vel est. Pellentesque 
										lacinia nulla id lorem cursus fringilla.</p>
										<p>Proin non commodo velit. Vestibulum ante ipsum primis in faucibus orci luctus et 
										ultrices posuere cubilia Curae; Donec elementum imperdiet volutpat. Integer sit amet felis 
										in magna iaculis molestie vel in velit. Nulla facilisi. Sed iaculis imperdiet turpis, in 
										vulputate lorem mattis non. In condimentum, neque vitae elementum sodales, metus mi congue 
										urna, a imperdiet sem massa at felis. Aliquam erat volutpat. Nullam eget lorem enim, at 
										venenatis felis. Maecenas et euismod diam.</p>
										<p>Pellentesque tortor tellus, cursus dignissim hendrerit non, ornare a tellus. Donec ut 
										consequat massa. Phasellus fermentum, justo vel congue tincidunt, metus diam sagittis eros, 
										sed ornare tellus enim sit amet sem. Duis gravida tortor eget risus varius vel ullamcorper 
										risus semper. </p>"                                        ;

                SampleUtilities.AddControlToPage(new Guid(AboutUsPageId), overviewContentBlock, "Content", "Content block");
            }
        }
        private void CreateSampleWorker(object[] args)
        {
            SampleUtilities.CreateUsersAndRoles();
            SampleUtilities.RegisterToolboxWidget("NewsRotator Widget", typeof(Rotator), "Samples");
            SampleUtilities.RegisterTheme(SamplesThemeName, SamplesThemePath);
            SampleUtilities.RegisterTemplate(new Guid(SamplesTemplateId), SamplesTemplateName, SamplesTemplateName, SamplesTemplatePath, SamplesThemeName);

            SampleUtilities.UploadImages(HttpRuntime.AppDomainAppPath + "Images", "Thumbnails");
            this.CreateNewsItems();

            var result = SampleUtilities.CreatePage(new Guid(NewsPageId), "News");

            if (result)
            {
                SampleUtilities.SetTemplateToPage(new Guid(NewsPageId), new Guid(SamplesTemplateId));

                NewsView newsView = new NewsView();
                SampleUtilities.AddControlToPage(new Guid(NewsPageId), newsView, "Content", "News");
            }

            result = SampleUtilities.CreatePage(new Guid(NewsRotatorWidgetPageId), NewsRotatorWidgetPageName, true);

            if (result)
            {
                SampleUtilities.SetTemplateToPage(new Guid(NewsRotatorWidgetPageId), new Guid(SamplesTemplateId));

                Rotator newsRotator = new Rotator();
                SampleUtilities.AddControlToPage(new Guid(NewsRotatorWidgetPageId), newsRotator, "Content", "NewsRotator Widget");
            }
        }
示例#5
0
        private void CreateContactUsPage()
        {
            var result = SampleUtilities.CreatePage(new Guid(ContactUsPageId), "Contact Us", new Guid(AboutUsPageId));

            if (result)
            {
                SampleUtilities.SetTemplateToPage(new Guid(ContactUsPageId), new Guid(SamplesTemplateId));

                var titleContentBlock = new ContentBlockBase();
                titleContentBlock.Html = string.Concat(@"<h1>Contact Us</h1>", FILLER_TEXT);

                SampleUtilities.AddControlToPage(new Guid(ContactUsPageId), titleContentBlock, "Content", "Content block");
            }
        }
示例#6
0
        private void CreateHomePage()
        {
            var result = SampleUtilities.CreatePage(new Guid(HomePageId), "Home");

            if (result)
            {
                SampleUtilities.SetTemplateToPage(new Guid(HomePageId), new Guid(SamplesTemplateId));

                // add welcome and instructions to page
                var generalInformationBlock = new ContentBlock();
                generalInformationBlock.Html = @"<h1>Sitefinity Event Logger Module Example</h1><p>This is the home page for the SiteMap Event Logger module example website. To view the log visit <a href=""/Sitefinity/Administration/EventLogger"">Event Logger Administration</a> (requires login).</p>";

                SampleUtilities.AddControlToPage(new Guid(HomePageId), generalInformationBlock, "Content", "Content block");
            }
        }
示例#7
0
        private void CreateForumsPage()
        {
            var result = SampleUtilities.CreatePage(new Guid(ForumsPageId), "Forum");

            if (result)
            {
                SampleUtilities.SetTemplateToPage(new Guid(ForumsPageId), new Guid(SamplesTemplateId));

                var templateKey  = SampleUtilities.GetControlTemplateKey(typeof(ForumListView), "List of forums");
                var forumControl = new ForumsView();
                forumControl.MasterViewName = "ForumListView";

                SampleUtilities.AddControlToPage(new Guid(ForumsPageId), forumControl, "Content", "Forum View");
            }
        }
        private void CreateHomePage()
        {
            var result = SampleUtilities.CreatePage(new Guid(HomePageId), "Home");

            if (result)
            {
                SampleUtilities.SetTemplateToPage(new Guid(HomePageId), new Guid(SamplesTemplateId));

                // add welcome and instructions to page
                var generalInformationBlock = new ContentBlock();
                generalInformationBlock.Html = @"<h1>SiteMap Intra-Site Module Example</h1><p>This is the home page for the SiteMap Intra-Site module example website. To view the sitemap visit <a href=""sitemap.xml"">sitemap.xml</a>.</p>";

                SampleUtilities.AddControlToPage(new Guid(HomePageId), generalInformationBlock, "Content", "Content block");
            }
        }
        private void CreateContactUsPage()
        {
            var result = SampleUtilities.CreatePage(new Guid(ContactUsPageId), "Contact Us", new Guid(AboutUsPageId));

            if (result)
            {
                SampleUtilities.SetTemplateToPage(new Guid(ContactUsPageId), new Guid(SamplesTemplateId));

                var titleContentBlock = new ContentBlockBase();
                titleContentBlock.Html = @"<h1>Contact Us</h1>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec sed diam lectus, vel facilisis odio. Donec ac rutrum felis. Curabitur bibendum est vel elit iaculis a scelerisque massa rhoncus. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.</p>";

                SampleUtilities.AddControlToPage(new Guid(ContactUsPageId), titleContentBlock, "Content", "Content block");
            }
        }
示例#10
0
        private void CreateSampleWorker(object[] args)
        {
            SampleUtilities.RegisterToolboxWidget("Products Widget", typeof(ProductsView), "Samples");
            SampleUtilities.RegisterTheme(SamplesThemeName, SamplesThemePath);
            SampleUtilities.RegisterTemplate(new Guid(SamplesTemplateId), SamplesTemplateName, SamplesTemplateName, SamplesTemplatePath, SamplesThemeName);

            var result = SampleUtilities.CreatePage(new Guid(ProductsPageId), ProductsPageName, true);

            if (result)
            {
                SampleUtilities.SetTemplateToPage(new Guid(ProductsPageId), new Guid(SamplesTemplateId));

                ProductsView productsView = new ProductsView();
                SampleUtilities.AddControlToPage(new Guid(ProductsPageId), productsView, "Content", "Products Widget");
            }
        }
        private void CreateSampleWorker(object[] args)
        {
            SampleUtilities.CreateUsersAndRoles();
            SampleUtilities.RegisterTheme(SamplesThemeName, SamplesThemePath);
            SampleUtilities.RegisterTemplate(new Guid(SamplesTemplateId), SamplesTemplateName, SamplesTemplateName, SamplesTemplatePath, SamplesThemeName);

            var result = SampleUtilities.CreatePage(new Guid(JobApplicationPageId), JobApplicationPageName, true);

            if (result)
            {
                SampleUtilities.SetTemplateToPage(new Guid(JobApplicationPageId), new Guid(SamplesTemplateId));

                var jobApplicationUpload = new JobApplicationUpload();
                SampleUtilities.AddControlToPage(new Guid(JobApplicationPageId), jobApplicationUpload, "Content", "UploadJobsWidget");
            }
        }
示例#12
0
        private void CreateNewsPage()
        {
            var result = SampleUtilities.CreatePage(new Guid(NewsPageId), "News");

            if (result)
            {
                SampleUtilities.SetTemplateToPage(new Guid(NewsPageId), new Guid(SamplesTemplateId));

                var templateKey = SampleUtilities.GetControlTemplateKey(typeof(MasterListView), "Titles, dates and summaries");
                SampleUtilities.RegisterNewsFrontendView("NewsFrontend", templateKey, typeof(MasterListView), "NewsFrontendTitleDatesAndSummariesList");

                var newsControl = new NewsView();
                newsControl.MasterViewName = "NewsFrontendTitleDatesAndSummariesList";

                SampleUtilities.AddControlToPage(new Guid(NewsPageId), newsControl, "Content", "News View");
            }
        }
        private void CreateSampleWorker(object[] args)
        {
            SampleUtilities.RegisterTheme(SamplesThemeName, SamplesThemePath);
            SampleUtilities.RegisterTemplate(new Guid(SamplesTemplateId), SamplesTemplateName, SamplesTemplateName, SamplesTemplatePath, SamplesThemeName);

            var result = SampleUtilities.CreatePage(new Guid(HomePageId), HomePageName, true);

            if (result)
            {
                SampleUtilities.SetTemplateToPage(new Guid(HomePageId), new Guid(SamplesTemplateId));

                // add a note with a link to the Template Builder
                ContentBlockBase contentBlock = new ContentBlockBase();
                contentBlock.Html = @"<h2>Note:</h2><p>The module in this sample works with templates, created using the <a href='http://www.sitefinity.com/devnet/templatebuilder.aspx'>Sitefinity Template Builder</a></p>";
                SampleUtilities.AddControlToPage(new Guid(HomePageId), contentBlock, "Content", "Content Block");
            }
        }
示例#14
0
        private void CreateEventsPage()
        {
            var result = SampleUtilities.CreatePage(new Guid(EventsPageId), "Events");

            if (result)
            {
                SampleUtilities.SetTemplateToPage(new Guid(EventsPageId), new Guid(SamplesTemplateId));

                var templateKey = SampleUtilities.GetControlTemplateKey(typeof(MasterView), "Titles, cities, dates");
                SampleUtilities.RegisterEventsFrontendView("EventsFrontend", templateKey, typeof(MasterView), "EventsFrontendDateList");

                var eventsControl = new EventsView();
                eventsControl.MasterViewName = "EventsFrontendDateList";
                eventsControl.ControlDefinition.GetDefaultDetailView().TemplateKey = SampleUtilities.GetControlTemplateKey(typeof(Telerik.Sitefinity.Modules.Events.Web.UI.Public.DetailsView), "Full event item");

                SampleUtilities.AddControlToPage(new Guid(EventsPageId), eventsControl, "Content", "Events View");
            }
        }
        private void CreateSample(object[] args)
        {
            SampleUtilities.RegisterToolboxWidget("CoverFlowWidget", typeof(CoverFlow), "Samples");
            SampleUtilities.RegisterTheme(SamplesThemeName, SamplesThemePath);
            SampleUtilities.RegisterTemplate(new Guid(SamplesTemplateId), SamplesTemplateName, SamplesTemplateName, SamplesTemplatePath, SamplesThemeName);

            SampleUtilities.UploadImages(HttpRuntime.AppDomainAppPath + "Images", "CoverFlowImages");

            var result = SampleUtilities.CreatePage(new Guid(CoverFlowWidgetPageId), CoverFlowWidgetPageName, true);

            if (result)
            {
                SampleUtilities.SetTemplateToPage(new Guid(CoverFlowWidgetPageId), new Guid(SamplesTemplateId));

                CoverFlow myWidget = new CoverFlow();
                myWidget.AlbumTitle = "CoverFlowImages";

                SampleUtilities.AddControlToPage(new Guid(CoverFlowWidgetPageId), myWidget, "Content", "CoverFlowWidget");
            }
        }
示例#16
0
        private void CreateSample(object[] args)
        {
            SampleUtilities.RegisterTheme(SamplesThemeName, SamplesThemePath);
            SampleUtilities.RegisterTemplate(new Guid(SamplesTemplateId), SamplesTemplateName, SamplesTemplateName, SamplesTemplatePath, SamplesThemeName);

            this.CreateForums();
            this.CreateBlogs();

            var result = SampleUtilities.CreatePage(new Guid(HomePageId), "Home", true);

            if (result)
            {
                SampleUtilities.SetTemplateToPage(new Guid(HomePageId), new Guid(SamplesTemplateId));

                ContentBlockBase cb = new ContentBlockBase();
                cb.Html = "<h1>Akismet Integration</h1><p>This sample demonstrates how to integrate Akismet with Sitefinity using the EventHub mechanism. You can submit new Forum posts or Blog comments, which will be checked through Akismet for spam.</p>";

                SampleUtilities.AddControlToPage(new Guid(HomePageId), cb, "Content", "Content Block");
            }

            var result2 = SampleUtilities.CreatePage(new Guid(ForumsPageId), "Forum");

            if (result2)
            {
                SampleUtilities.SetTemplateToPage(new Guid(ForumsPageId), new Guid(SamplesTemplateId));

                ForumsView forums = new ForumsView();
                SampleUtilities.AddControlToPage(new Guid(ForumsPageId), forums, "Content", "Forums");
            }

            var result3 = SampleUtilities.CreatePage(new Guid(BlogPageId), "Blog");

            if (result3)
            {
                SampleUtilities.SetTemplateToPage(new Guid(BlogPageId), new Guid(SamplesTemplateId));

                BlogPostView blogs = new BlogPostView();
                SampleUtilities.AddControlToPage(new Guid(BlogPageId), blogs, "Content", "Blog Posts");
            }
        }
        private void CreateSampleWorker(object[] args)
        {
            SampleUtilities.RegisterToolboxWidget("Locations Widget", typeof(LocationsView), "Samples");
            SampleUtilities.RegisterTheme(SamplesThemeName, SamplesThemePath);
            SampleUtilities.RegisterTemplate(new Guid(SamplesTemplateId), SamplesTemplateName, SamplesTemplateName, SamplesTemplatePath, SamplesThemeName);

            // Create Locations public landing page
            var result = SampleUtilities.CreatePage(new Guid(LocationsPageID), "Locations", true);

            if (result)
            {
                SampleUtilities.SetTemplateToPage(new Guid(LocationsPageID), new Guid(SamplesTemplateId));
                var locationsView = new LocationsView();
                locationsView.ContentViewDisplayMode = ContentViewDisplayMode.Automatic;
                SampleUtilities.AddControlToPage(new Guid(LocationsPageID), locationsView, "Content", "Locations Widget");
            }

            #region Create Taxonomy

            // ensure Categories taxonomy exists
            var taxonomyMgr = TaxonomyManager.GetManager();
            var taxonomy    = taxonomyMgr.GetTaxonomies <HierarchicalTaxonomy>().FirstOrDefault(t => t.Name == "Categories");
            if (taxonomy == null)
            {
                taxonomy           = taxonomyMgr.CreateTaxonomy <HierarchicalTaxonomy>(new Guid(TaxonomyID));
                taxonomy.Name      = "Categories";
                taxonomy.Title     = "Categories";
                taxonomy.TaxonName = "Categories";
                taxonomyMgr.SaveChanges();
            }

            // Add continents as categories
            if (taxonomy.Taxa.Count == 0)
            {
                var taxon = taxonomyMgr.CreateTaxon <HierarchicalTaxon>();
                taxon.Title   = "Europe";
                taxon.Name    = "Europe";
                taxon.UrlName = "europe";
                taxonomy.Taxa.Add(taxon);

                taxon         = taxonomyMgr.CreateTaxon <HierarchicalTaxon>();
                taxon.Title   = "North America";
                taxon.Name    = "North America";
                taxon.UrlName = "north-america";
                taxonomy.Taxa.Add(taxon);

                taxon         = taxonomyMgr.CreateTaxon <HierarchicalTaxon>();
                taxon.Title   = "Australia";
                taxon.Name    = "Australia";
                taxon.UrlName = "australia";
                taxonomy.Taxa.Add(taxon);

                taxonomyMgr.SaveChanges();
            }

            #endregion

            #region Create Sample Data

            // init content manager
            var mgr = new LocationsManager();

            // create sample items if not exist
            if (mgr.GetLocations().Count() == 0)
            {
                // North American Offices
                CreateLocation(mgr, "Boston Office", "460 Totten Pond Rd, Suite 640", "Waltham", "MA", "02451", "USA", "North America");
                CreateLocation(mgr, "Houston Office", "10200 Grogans Mill Rd, Suite 130", "The Woodlands", "TX", "77380", "USA", "North America");
                CreateLocation(mgr, "Austin Office", "701 Brazos Street, Suite 320", "Austin", "TX", "78701", "USA", "North America");
                CreateLocation(mgr, "Canada Office", "460 Totten Pond Rd, Suite 640", "Waltham", "MA", "02451", "USA", "North America");

                // Europe Offices
                CreateLocation(mgr, "London Office", "15 Bedford Square", "London", "London", "WC1B 3JA", "UK", "Europe");
                CreateLocation(mgr, "Bulgaria Office", "33 Alexander Malinov Blvd.", "Sofia", "Sofia", "1729", "Bulgaria", "Europe");
                CreateLocation(mgr, "Germany Office", "Balanstrasse 73", "Munich", "Munich", "81541", "Germany", "Europe");

                // Australian Office
                CreateLocation(mgr, "Sydney Office", "81-91 Military Road", "Neutral Bay", "NSW", "2089", "Australia", "Australia");
            }

            // save locations
            mgr.SaveChanges();

            #endregion
        }
示例#18
0
        private void CreateSampleWorker(object[] args)
        {
            SampleUtilities.CreateUsersAndRoles();
            SampleUtilities.RegisterTheme(SamplesThemeName, SamplesThemePath);
            SampleUtilities.RegisterTemplate(new Guid(SamplesTemplateId), SamplesTemplateName, SamplesTemplateName, SamplesTemplatePath, SamplesThemeName);

            // Create Testimonials home page
            var result = SampleUtilities.CreatePage(new Guid(HomePageID), "Home", true);

            if (result)
            {
                SampleUtilities.SetTemplateToPage(new Guid(HomePageID), new Guid(SamplesTemplateId));

                // add welcome and instructions to page
                var generalInformationBlock = new ContentBlock();
                generalInformationBlock.Html = @"<h1>Testimonials Intra-Site Module Example</h1><p>This is the home page for the Testimonials Intra-Site module. Below is the Testimonials View Widget. It has a property to set a <a href=""testimonials"">separate page</a> for the details view.</p><p>On <a href=""testimonials"">the testimonials page</a> is a separate Testimonials View Widget that uses its own page as the details page.</p><p>This allows you to have multiple instances of the same content lists, all pointing to the same details page.</p>";

                SampleUtilities.AddControlToPage(new Guid(HomePageID), generalInformationBlock, "Content", "Content block");

                // create Testimonials View
                var mgr  = PageManager.GetManager();
                var ctrl = mgr.CreateControl <PageControl>("~/Modules/Testimonials/TestimonialsView.ascx", "Content");
                ctrl.Caption = "TestimonialsView";

                // set details page to Testimonials Page
                var prop = ctrl.Properties.FirstOrDefault(p => p.Name == "DetailsPageID");
                if (prop == null)
                {
                    prop      = new ControlProperty();
                    prop.Id   = Guid.NewGuid();
                    prop.Name = "DetailsPageID";
                    ctrl.Properties.Add(prop);
                }

                // the ID is needed for the control to be duplicated
                var idProp = ctrl.Properties.FirstOrDefault(p => p.Name == "ID");
                if (idProp == null)
                {
                    idProp      = new ControlProperty();
                    idProp.Id   = Guid.NewGuid();
                    idProp.Name = "ID";
                    ctrl.Properties.Add(idProp);
                }

                prop.Value   = TestimonialsPageID;
                idProp.Value = "TestimonialsView";

                SampleUtilities.AddControlToPage(new Guid(HomePageID), ctrl, "Content");
            }

            // Create Testimonials list/details page
            result = SampleUtilities.CreatePage(new Guid(TestimonialsPageID), "Testimonials", false);
            if (result)
            {
                SampleUtilities.SetTemplateToPage(new Guid(TestimonialsPageID), new Guid(SamplesTemplateId));
                SampleUtilities.AddControlToPage(new Guid(TestimonialsPageID), "~/Modules/Testimonials/TestimonialsView.ascx", "Content", "TestimonialsView");
            }

            // "Submit Testimonial" page
            result = SampleUtilities.CreatePage(new Guid(SubmitTestimonialPageID), "Submit", false);
            if (result)
            {
                SampleUtilities.SetTemplateToPage(new Guid(SubmitTestimonialPageID), new Guid(SamplesTemplateId));
                SampleUtilities.AddControlToPage(new Guid(SubmitTestimonialPageID), "~/Modules/Testimonials/SubmitTestimonial.ascx", "Content", "SubmitTestimonial");
            }

            // create sample testimonials
            var context = TestimonialsContext.Get();

            if (context.Testimonials.Count() > 0)
            {
                return;
            }

            context.Add(new Testimonial()
            {
                Name       = "John Doe",
                Rating     = 5,
                Summary    = "What a great product!",
                Text       = TESIMONIAL_TEXT,
                DatePosted = DateTime.Now,
                Published  = true,
                UrlName    = "john-doe"
            });
            context.Add(new Testimonial()
            {
                Name       = "Jane Doe",
                Rating     = 4,
                Summary    = "A solid product, almost perfect!",
                Text       = TESIMONIAL_TEXT,
                DatePosted = DateTime.Now,
                Published  = true,
                UrlName    = "jane-doe"
            });
            context.Add(new Testimonial()
            {
                Name       = "Jim Doe",
                Rating     = 3,
                Summary    = "Not bad; worth my time but could use a few more features.",
                Text       = TESIMONIAL_TEXT,
                DatePosted = DateTime.Now,
                Published  = true,
                UrlName    = "jim-doe"
            });
            context.SaveChanges();
        }