Ejemplo n.º 1
0
 public static List <SqlColumnSchema> GetSqlColumnSchemas(this ISqlSchemaReader reader, string connectionString, SqlColumnSchema schemaRestriction)
 {
     using (var sqlConnection = new SqlConnection(connectionString).Then(c => c.Open()))
     {
         return(reader.GetSqlColumnSchemas(sqlConnection, schemaRestriction));
     }
 }
Ejemplo n.º 2
0
        public void GetSqlColumnSchemas_TestingDb_ThreeColumns()
        {
            var columnSchemas = _sqlSchemaReader.GetSqlColumnSchemas(
                connectionString: ConfigurationManager.ConnectionStrings["TestingDb"].ConnectionString,
                schemaRestriction: new SqlColumnSchema
            {
                TableCatalog = "TestingDb",
                TableSchema  = "reusable_data_sqlclient"
            });

            Assert.AreEqual(3, columnSchemas.Count);

            //var sqlTableSchema = columnSchemas.Single();

            //Assert.AreEqual("SqlSchemaReaderTest", sqlTableSchema.TableName);
        }
Ejemplo n.º 3
0
 public static List <SqlColumnSchema> GetSqlColumnSchemas(this SqlConnection sqlConnection, SqlColumnSchema schemaRestriction)
 {
     return(SqlSchemaReader.GetSqlColumnSchemas(sqlConnection, schemaRestriction));
 }