-
Notifications
You must be signed in to change notification settings - Fork 0
TQueryCrudExtensions_Update_8ptvJeu7jTSFfxPme7rmVA
Updates one or more columns on all records of the TQuery recordset to the database table by the predicate assignment(s).
public static DbEasyConnect.DbEcUpdate<Table> Update<Table>(this DbEasyConnect.DbEcExtended<Table> tQuery, System.Linq.Expressions.Expression<System.Func<Table,Table>> assignment);
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 update command.
assignment
System.Linq.Expressions.Expression<System.Func<Table,Table>>
The columns to be updated with their new value assignment.
Example: DbEc().Update(x => new Sample { MyProperty = x.MyInteger + 5, MyString = null, MyBool = true, MyOtherString = "something" })
DbEasyConnect.DbEcUpdate<Table>
An DbEcUpdate<T> instance, which the SQL command will update records in the database, and Execute() will return the number of records updated successfully.