Beispiel #1
0
        public static void SetContextDatabaseType(string contextName, DaoDbType type)
        {
            lock (lockContextTypes)
            {
                if (contextDatabaseTypes.ContainsKey(contextName))
                {
                    if (contextDatabaseTypes[contextName] == type)
                    {
                        return;
                    }

                    ExceptionHelper.Throw <InvalidOperationException>(
                        "Cannot set database provider type on DaoContext '{0}' to '{1}' because it has already been set to '{2}'",
                        contextName, type.ToString(), contextDatabaseTypes[contextName]);
                }
                else
                {
                    contextDatabaseTypes.Add(contextName, type);
                }
            }
        }
 public UnableToDetermineConnectionStringException(string contextName, DaoDbType type)
     : base("Unable to determine connection string from default configuration for contextName '" + contextName + "' DaoDbType '" + type.ToString() + "'")
 {
 }
Beispiel #3
0
 public UnableToDetermineConnectionStringException(string contextName, DaoDbType type)
     : base("Unable to determine connection string from default configuration for contextName '" + contextName + "' DaoDbType '" + type.ToString() + "'")
 {
 }