Esempio n. 1
0
 private static void SetSiteTheme()
 {
     Database.ApplicationDbContext db = new Database.ApplicationDbContext();
     SiteSettings settings = db.SiteSettings.FirstOrDefault(x => x.ThemeId != 0);
     if (settings != null)
     {
         Theme theme = db.Themes.Find(settings.ThemeId);
         if (theme != null)
         {
             ThemeContainer.SetCurrentTheme(theme.URL);
         }
     }
 }
Esempio n. 2
0
 public BlogsController(Database.ApplicationDbContext dbContext)
 {
     this.dbContext = dbContext;
 }
Esempio n. 3
0
 public CategoriesController(Database.ApplicationDbContext dbContext)
 {
     this.dbContext = dbContext;
 }