protected void MinimalSqlBackedExample() { var connectionString = ConfigurationManager.ConnectionStrings["CmsDatabase"].ConnectionString; var cmsContentRepository = new SqlCmsContentRepository(connectionString); ReallyTinyCms .ConfigureWithContentSource(() => cmsContentRepository, 1.Minute()) .EditModeShouldBeEnabledWhen(requestContext => requestContext.HttpContext.Request.QueryString.ToString().Contains("editmode")) .ConfigureEditRoute(RouteTable.Routes, "cms"); }
private static void ConfigureCms() { var connectionString = ConfigurationManager.ConnectionStrings["CmsDatabase"].ConnectionString; var cmsContentRepository = new SqlCmsContentRepository(connectionString); ReallyTinyCms .ConfigureWithContentSource(() => cmsContentRepository, 1.Minute()) .WhenCacheRefreshes(() => Debug.WriteLine("Just performed a cache refresh")) .WhenContentIsRequested((contentItemName, defaultValue) => Debug.WriteLine("Just performed a lookup for " + contentItemName)) .EditModeShouldBeEnabledWhen(requestContext => requestContext.HttpContext.Request.QueryString.ToString().Contains("editmode")) .WithFilters(new NoOpFilter()) .ConfigureEditRoute(RouteTable.Routes, "cms"); }