ISqlModelMapper.TrackMaster Method
.NET Standard 2.x
Tracks an insert, update or delete operation to the master table, when working with multiple models which are in the master-detail relationship. The data state determines which type of operation (insert, update or delete) will be performed. The data to be manipulated is cached in the TModel
object. When ISqlModelMapper.SaveChanges method is called, a SQL statement (INSERT, UPDATE or DELETE) will be first generated using the data cached in the TModel
object and the mapping information defined in TModel
class, and then executed.
Namespace: SnapObjects.Data
Assembly: SnapObjects.Data.dll
Overloads
Method | Description |
---|---|
TrackMaster<TModel>(IModelEntry<TModel> modelEntry) | Tracks an insert, update or delete operation to the master table, when working with multiple models which are in the master-detail relationship. The data state determines which type of operation (insert, update or delete) will be performed. The data to be manipulated is cached in the TModel object. When ISqlModelMapper.SaveChanges method is called, a SQL statement (INSERT, UPDATE or DELETE) will be first generated using the data cached in the TModel object and the mapping information defined in TModel class, and then executed. |
TrackMaster<TModel>(IModelEntry<TModel> modelEntry, Action<ISaveContext> afterSaveAction) | Tracks an insert, update or delete operation to the master table and an Action<ISaveContext> object, when working with multiple models which are in the master-detail relationship. The data state determines which type of operation (insert, update or delete) will be performed. The data to be manipulated is cached in the TModel object. When ISqlModelMapper.SaveChanges method is called, a SQL statement (INSERT, UPDATE or DELETE) will be first generated using the data cached in the TModel object and the mapping information defined in TModel class, and then executed; and after that, the Action<ISaveContext> object will be called. |