/// <summary> /// Gets the <see cref="Lephone.Data.DbContext"/> with the specified context. /// </summary> /// <value></value> public DbContext this[string context] { get { lock (syncObj) { if (contexts.ContainsKey(context.ToLower())) { return(contexts[context.ToLower()]); } else { try { DbContext dbContext = DbEntry.GetContext(context.ToLower()); //new DbContext(context.ToLower()); contexts.Add(context.ToLower(), dbContext); return(dbContext); } catch { return(null); } } } } }