public ForumRepository(LanLordzDataContext db, ICacheManager dataCache, ConfigurationRepository config, SecurityRepository security) { if (db == null) { throw new ArgumentNullException("db"); } if (dataCache == null) { throw new ArgumentNullException("dataCache"); } if (security == null) { throw new ArgumentNullException("security"); } if (config == null) { throw new ArgumentNullException("config"); } this.db = db; this.dataCache = dataCache; this.security = security; this.config = config; }
protected void Session_Start() { using (var db = new LanLordzDataContext()) { lock (syncRoot) { db.ExecuteCommand("UPDATE dbo.Configuration SET Value = cast(Value as bigint) + 1 WHERE Property = 'Visitors'"); } } }
public ConfigurationRepository(LanLordzDataContext db, ICacheManager dataCache) { if (db == null) { throw new ArgumentNullException("db"); } this.dataCache = dataCache; this.db = db; this.LoadConfiguration(); }
protected virtual void Dispose(bool disposing) { if (disposing) { if (this.config != null) { this.config = null; } if (this.db != null) { this.db = null; } } }
public PollRepository(LanLordzDataContext db, ICacheManager dataCache, ConfigurationRepository config) { if (db == null) { throw new ArgumentNullException("db"); } if (dataCache == null) { throw new ArgumentNullException("dataCache"); } if (config == null) { throw new ArgumentNullException("config"); } this.db = db; this.dataCache = dataCache; this.config = config; }