Generates an update query for a given entity, key columns, excluded columns, and edited properties.
Syntax
public string GenerateUpdateQuery<T>(T DataContract, List<string> keyColumns, List<string> excludedColumns, (string propName, object propValue)[] editedProperties)
Type Parameters
Name |
Description |
T |
The type of entity. |
Parameters
Name |
Type |
Description |
DataContract |
T |
The entity object. |
keyColumns |
List<string> |
The list of key columns for updating. |
excludedColumns |
List<string> |
The list of columns to exclude from update. |
editedProperties |
(string propName, object propValue)[] |
The dictionary containing edited properties. |
Return Value
Type |
Description |
string |
The generated SQL update query. |