GenerateInsertQuery<T>(T, List<string>, List<string>) Method
Generates an INSERT query for inserting data into a database table.

Syntax

string GenerateInsertQuery<T>(T entity, List<string> keyColumns, List<string> excludedColumns)

Type Parameters

Name Description
T

Parameters

Name Type Description
entity T The entity representing the data to be inserted.
keyColumns List<string> The list of key columns used for insertion.
excludedColumns List<string> The list of columns to be excluded from the insertion.

Return Value

Type Description
string A string representing the generated INSERT query.