Skip to content

TQueryStartExtensions_TQuery_rk3T1qX1p10xKcsETuWFYA

Jacob Spitzer edited this page Aug 28, 2022 · 3 revisions

TQueryStartExtensions.TQuery<Table>(SqlConnection, SqlDialect) Method

Initializes a new instance of the DbEc<T> class when taken a class type that contains the [Table] attribute.

public static DbEasyConnect.DbEc<Table> DbEc<Table>(this SqlConnection sqlConnection, DbEasyConnect.SqlDialect sqlDialect=DbEasyConnect.SqlDialect.SqlServer);

Type parameters

Table
The type of the records of table class. need to be a class with the [Table("")] attribute.

Parameters

sqlConnection System.Data.SqlClient.SqlConnection
The SqlConnection to be used to connect to the Server Database.

sqlDialect SqlDialect
The relevant SqlDialect for the current database. Available options: SQL Server, MySQL, Oracle, SQLite, and PostgreSQL. these are all different databases that have their own slightly different SQL dialects. If no dialect was given, the default dialect SqlServer will be used.

Returns

DbEasyConnect.DbEc<Table>
An DbEc<T> instanse which will be used to query and/or modify the table with TQuery method extensions.

Clone this wiki locally