This would combine GetAsync and wrap it in a ChangeTracker<T>. I think you'd need something like a new GetTrackedResult type like this:
public class TrackedModel<T>
{
public T Model { get; set; } // this is your returned model instance that you work with
public LoggedChangeTracker<T> ChangeTracker { get; set; }
}
Then there would be an extension method SaveTrackedAsync that accepts a TrackedModel<T> in turn when saving.
This would combine
GetAsync
and wrap it in aChangeTracker<T>
. I think you'd need something like a newGetTrackedResult
type like this:Then there would be an extension method
SaveTrackedAsync
that accepts aTrackedModel<T>
in turn when saving.