BulkUpdate
You can specify search criteria on one or more objects, and also specify the fields that should be updated by the BulkUpdate. It is relatively very simple to update zero or more records without needing to write complex database specific sql statements.
The process involves setting each field's UseInSearch property to true that should be included in search, and setting UseInSave property to true for the fields that you would like to update.
| C# | |
|---|---|
public virtual bool BulkUpdate() | |
Return Value
True if the BulkUpdate was successful. You can see the AffectedRecords property to find out how many records were updated.You can update multiple fields in multiple rows at the same time. You can limit the update to specific records by specifing a search criteria. The search critieria can be specified on the table being update or any of its related tables.
| C# | Copy Code |
|---|---|
using (UserRoles ur = new UserRoles()) | |
Target Platforms: .NET Framework 1.1 or .NET Framework 2.0