-
Notifications
You must be signed in to change notification settings - Fork 0
TQueryTableExtensions_CreateTableIfNotExists_p65htqrS8npPk16jfYpmDw
Jacob Spitzer edited this page Aug 28, 2022
·
2 revisions
Creates a Table on the server database if not exists, based on the code table properties. Supported attributes are: [Key] for Primary Key, [AutoIncrement] for Auto Increment property, [Required] for Not Null property.
public static DbEasyConnect.DbEcCreate<Table> CreateTableIfNotExists<Table>(this DbEasyConnect.DbEcExtended<Table> tQuery);
Table
The type of the records of table class. need to be a class with the [Table("")] attribute.
tQuery
DbEasyConnect.DbEcExtended<Table>
An DbEcExtended<T> to perform the Create Table command.
DbEasyConnect.DbEcCreate<Table>
An DbEcCreate<T> instance, which the SQL command will Create the Table in the database, and Execute() will execute the Create Table command.