Generates an insert query for a given entity, key columns, and excluded columns.
Syntax
public string GenerateInsertQuery<T>(T entity, List<string> keyColumns, List<string> excludedColumns)
Type Parameters
Name |
Description |
T |
The type of entity. |
Parameters
Name |
Type |
Description |
entity |
T |
The entity object. |
keyColumns |
List<string> |
The list of key columns for insertion. |
excludedColumns |
List<string> |
The list of columns to exclude from insertion. |
Return Value
Type |
Description |
string |
The generated SQL insert query. |