Delete
Runs a Delete command to delete the record whose primary key values match the PrimaryKeyFields values. This method expects that all the primary key values have been specified.
No recursive action is taken on the joined objects. Each object's Delete method must be called to delete the related records as well.
This method will reset the AffectedRecords property to the number of rows deleted.
Business object must have at least one primary key field defined for this operation to work.
NOTE: As of version 3.x this method preserves each field's UseInSearch values, and does not reset any of the property values unlike the version 2.x and older did. Also starting version 3.x this method will retain any information related to any records deleted that can be a later applied to the database. If the ObjectState property is set to Connected then the Delete command is sent to the database immediatly.
Returns:
| Type | |
|---|---|
| System.Boolean |
| C# | |
|---|---|
public virtual bool Delete() | |
Target Platforms: .NET Framework 1.1 or .NET Framework 2.0