Click or drag to resize

IMapperSave Method (MapperSaveOptions)

Save the current changes allowing for specific MapperSaveOptions options. If no fields are Dirty, no save is performed. Saves are typically performed using the Save method with default mapper Save behaviour.

Namespace:  NetQuarry.Data
Assembly:  EAP.Core (in EAP.Core.dll) Version: 2.0.0.0 (4.6.8.0)
Syntax
bool Save(
	MapperSaveOptions options
)

Parameters

options
Type: NetQuarry.DataMapperSaveOptions
Options overriding standard Save behaviour.

Return Value

Type: Boolean
True if a save is performed, else false.
Remarks
Unless the NoRowRequery option is specified during the save, or the mapper's NoRowRequery attribute is set, the mapper save operation includes a post-save RowRequery of the affected database record to pick up changes that may have occured due to triggers, calculated columns, identity values, and similar.

Historically the RowRequery reused the mapper's internal DataTable or DataReader putting it into a state where a number of mapper operations such as MoveNext and HasRecords behaved somewhat unexpectedly after the RowRequery. An improved RowRequery mechanism was introduced in v4.6.3 and is now the default behaviour for the mapper. The improved RowRequery mechanism uses a dedicated DataTable/DataReader for the RowRequery so as to avoid this problem.

For backward compatibility, you can revert to the old RowRequery mechanism system-wide by setting the OldRowRequery Compatibility feature, or for a particular mapper by setting the mapper's OldRowRequery tweak. Note, however, that if the ImprovedRowRequery is specified in the save, that option takes precedence and if a RowRequery is performed the new mechanism will be used regardless of any other settings.

See Also