0% found this document useful (0 votes)
28 views3 pages

Quick Reference BimlExtensions

The document provides a quick reference to common extension methods in Biml, listing the name, description, example usage, and description of the example for each method. Some key methods include Collapse to concatenate values from a collection, GenerateSchemaBiml to create Biml for a database schema, GenerateTableNode to create a node for a database table, GetBiml to retrieve the Biml representation of an AstNode, and ImportDB to import database objects like tables and schemas.

Uploaded by

İbrahim Sezen
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views3 pages

Quick Reference BimlExtensions

The document provides a quick reference to common extension methods in Biml, listing the name, description, example usage, and description of the example for each method. Some key methods include Collapse to concatenate values from a collection, GenerateSchemaBiml to create Biml for a database schema, GenerateTableNode to create a node for a database table, GetBiml to retrieve the Biml representation of an AstNode, and ImportDB to import database objects like tables and schemas.

Uploaded by

İbrahim Sezen
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Quick Reference for Biml extension methods.

Name of Method Description of Method Example Usage Description of Example


Returns a selected value from each item in the Returns a semicolon delimited list of
collection in a concatenated string, with a RootNode.Tables.Collapse(table => table names. See Linq Cheat Sheet for
Collapse separator table.Name, ";"); info on '=>' syntax.
Create the Biml to represent a schema from a Conn1.GenerateSchemaBiml( schemaName) Returns the schema for schemaName on
GenerateSchemaBiml database connection ; Conn1.

Create a node that represents the specified Conn1.GenerateSchemaNode(rootNode, Return the AstSchemaNode from Conn1,
GenerateSchemaNode schema schemaName); using the rootNode as the parent.

Create the nodes to represent schemas from a Gets the schema nodes from Conn1,
GenerateSchemaNodes database connection Conn1.GenerateSchemaNodes(); using the schema list from Conn1.
Create the nodes to represent schemas from a Conn1.GenerateSchemaNodes(SchemaImpo Gets the schema nodes from Conn1,
GenerateSchemaNodes database connection rter.GetSchemaList(Conn1)); using the schema list from Conn1.
Create the Biml to represent schemas from a Creates a list of Biml to generate all
GenerateSchemasBiml database connection OleConn.GenerateSchemaBiml(); schemas for OleConn.
Creates a list of Biml to generate all
Create the Biml to represent schemas from a OleConn.GenerateSchemaBiml(SchemaImpo schemas for OleConn, using schema list
GenerateSchemasBiml database connection rter.GetSchemaList(Conn1)); from Conn1.

Generates a table node from OleConn,


with the schema specified by schema
OleConn.GenerateTableNode(schemaName, name and the name of the generated
GenerateTableNode Create a node that represents the specified table "MyTable", ImportOptions.None); table as "MyTable".
Create the nodes to represent all tables from a
GenerateTableNodes database connection OleConn.GenerateTableNodes(); Creates a list of all tables in OleConn.
Creates a list of all tables in OleConn,
Create the Biml to represent all tables for the OleConn.GenerateTableNodes(schemaNam using the schemas specified by
GenerateTableNodes specified schemas from a database connection es); schemaNames.
Creates a list of all tables in OleConn,
Create the Biml to represent all tables for the OleConn.GenerateTableNodes(schemaNam using the schemas specified by
GenerateTableNodes specified schemas from a database connection es, ImportOptions.None); schemaNames.
Create the nodes to represent tables from a Creates a list of all tables in OleConn,
database connection, using the schema that the OleConn.GenerateTableNodes(schemaNam using the schema specified by
GenerateTableNodes table belongs to. e); schemaName.

Create the nodes to represent tables from a


database connection, using the schema that the Creates a list of all tables, specified by
table belongs to, and list of tables to generate OleConn.GenerateTableNodes(schemaNam tableNames, in OleConn, using the
GenerateTableNodes Biml for. e, tableNames, ImportOptions.None); schema specified by schemaName.
Gets the Biml for the first table in Tables.
See the Linq Cheat Sheet for more
GetBiml Retrieve the Biml that represents the AstNode RootNode.Tables.First().GetBiml(); methods on collections.
Returns the Biml code for a collection of Gets the Biml for all of the tables in
GetBiml AstNode objects. RootNode.Tables.GetBiml(); Tables.
Creates a list of the columns of the first
Builds a string containing the column list for the table in the Tables collection, in a string
GetColumnList table, formatted for a SQL statement RootNode.Tables.First().GetColumnList(); formatted for SQL Server.

Creates a list of the columns, prefixed


Builds a string containing the column list for the with "test.", of the first table in the
table, formatted for a SQL statement, with RootNode.Tables.First().GetColumnList("test Tables collection, in a string formatted for
GetColumnList tableAlias prefixed to the column names. ."); SQL Server.

RootNode.Tables.First().GetColumnList(colu
mn => column.IsUsedInKey, null, Creates a list of columns of the first table
Builds a string containing the column list for the DefaultBeginningDelimiter, in the Tables collection which are used in
GetColumnList table, formatted for a SQL statement DefaultEndingDelimiter); keys.

Creates a list of the columns of the first


table in the Tables collection, in a string
formatted for SQL Server with the
Builds a string containing the column list for the RootNode.Tables.First().GetColumnList(null, beginning delimeter set as a comma and
GetColumnList table, formatted for a SQL statement ",", ";"); the ending delimeter set as a semicolon.

Returns the SQL statement to create the


GetTableSql Generates the SQL statement to create a table RootNode.Tables.First().GetTableSql(); first table in the Tables collection.
Imports all supported objects from the
Import all supported objects from the database database associated with
ImportDB connection (tables, views, and schemas) OleConn.ImportDB(); MyOldDbConnection.

Imports all supported objects from the


database associated with
Import all supported objects from the database OleConn.ImportDB(schemaFilter, MyOldDbConnection, filtered by both the
ImportDB connection (tables, views, and schemas) tableFilter); schemaFilter and the tableFilter.
Imports all supported objects from the
database associated with
Import all supported objects from the database OleConn.ImportDB(schemaFilter, tableFilter, MyOldDbConnection, filtered by both the
ImportDB connection (tables, views, and schemas) ImportOptions.None); schemaFilter and the tableFilter.

Creates the nodes to represent all tables


Create the nodes to represent all tables from a OleConn.ImportTableNodes(schema, from OleConn using schema to process
ImportTableNodes database connection tableFilter); and filter the tables based on tableFilter.

Creates the nodes to represent all tables


Create the nodes to represent all tables from a OleConn.ImportTableNodes(schema, from OleConn using schema to process
ImportTableNodes database connection tableFilter, ImportOptions.None); and filter the tables based on tableFilter.

You might also like