Exemplo n.º 1
0
        private static ISqlAdapter GetFormatter(IDbConnection connection)
        {
            GetDatabaseTypeDelegate getDatabaseType = GetDatabaseType;
            string key = ((getDatabaseType != null) ? getDatabaseType(connection).ToLower() : null) ?? connection.GetType().Name.ToLower();

            if (AdapterDictionary.ContainsKey(key))
            {
                return(AdapterDictionary[key]);
            }
            return(DefaultAdapter);
        }