Ejemplo n.º 1
0
 public static ContentService InstantiateForDatabase(RequestContext c)
 {
     return(new ContentService(c,
                               HtmlTemplateRepository.InstantiateForDatabase(c),
                               PolicyRepository.InstantiateForDatabase(c),
                               CustomUrlRepository.InstantiateForDatabase(c),
                               ContentColumnRepository.InstantiateForDatabase(c)
                               ));
 }
        public static ContentColumnRepository InstantiateForDatabase(RequestContext c)
        {
            ContentColumnRepository result = null;

            result = new ContentColumnRepository(c,
                                                 new EntityFrameworkRepository <Data.EF.bvc_ContentColumn>(
                                                     new Data.EF.EntityFrameworkDevConnectionString(c.ConnectionStringForEntityFramework)),
                                                 new EntityFrameworkRepository <Data.EF.bvc_ContentBlock>(new Data.EF.EntityFrameworkDevConnectionString(c.ConnectionStringForEntityFramework)),
                                                 new SupressLogger()
                                                 );
            return(result);
        }
Ejemplo n.º 3
0
 public ContentService(RequestContext c,
                       HtmlTemplateRepository templates,
                       PolicyRepository policies,
                       CustomUrlRepository customUrls,
                       ContentColumnRepository cols)
 {
     context         = c;
     HtmlTemplates   = templates;
     this.Policies   = policies;
     this.CustomUrls = customUrls;
     this.Columns    = cols;
 }