GenerateUpdateQuery<T>(T, List<string>, List<string>, (string propName, object propValue)[]) Method
Generates an UPDATE query for updating data in a database table.

Syntax

string GenerateUpdateQuery<T>(T DataContract, List<string> keyColumns, List<string> excludedColumns, (string propName, object propValue)[] editedProperties)

Type Parameters

Name Description
T

Parameters

Name Type Description
DataContract T The entity with the updated data.
keyColumns List<string> The list of key columns used for updating.
excludedColumns List<string> The list of columns to be excluded from the update.
editedProperties (string propName, object propValue)[] A dictionary representing the properties and their new values to be updated.

Return Value

Type Description
string A string representing the generated UPDATE query.