ISqlModelMapper.Track Method
.NET Standard 2.x
Tracks an Action<ISaveContext>
object. The Action
will be called when ISqlModelMapper.SaveChanges method is called.
Namespace: SnapObjects.Data
Assembly: SnapObjects.Data.dll
Overloads
Method | Description |
---|---|
Track(Action<ISaveContext> saveAction) | Tracks an Action<ISaveContext> object. The Action will be called when ISqlModelMapper.SaveChanges method is called. |
Track<TModel>(IModelEntry<TModel> modelEntry) | Tracks a database table operation (insert, update, or delete). The data state determines which type of operation (insert, update, or delete) to 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. |
Track<TModel>(IModelEntry<TModel> modelEntry, Action<ISaveContext> afterSaveAction) | Tracks a database table operation (insert, update, or delete) and an Action<ISaveContext> object. The data state determines which type of operation (insert, update, or delete) to 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. |
Track(IMapperTrackable mapperTrackable, params object[] saveParms) | Tracks an IMapperTrackable object. When ISqlModelMapper.SaveChanges method is called, the SaveChanges method of this object will be called. |