Exemple #1
0
        public void Initialize()
        {
            using (var connection = new SqlConnection(_connectionString))
            {
                connection.Open();

                Schemas                = connection.Query <SchemaInfo>(Resources.Sql.ListSchemas);
                StoredProcedures       = connection.Query <StoredProcedureInfo>(Resources.Sql.ListStoredProcedures);
                UserDefinedTypes       = connection.Query <UserDefinedTypeInfo>(Resources.Sql.ListUserDefinedTypes);
                UserDefinedTypeColumns = connection.Query <UserDefinedTypeColumnInfo>(Resources.Sql.ListUserDefinedTypeColumns);
                Parameters             = connection.Query <ParameterInfo>(Resources.Sql.ListParameters);

                Schemas.ToList().ForEach(s => s.Initialize(this));
            }
        }