Closed ydlkrishna closed 5 years ago
Hi there Krishna. So the purpose of Trackable Entities is to track entity change state across service boundaries. . When an entity is sent from client to service, EF sets its state to Detached, which means it is not being tracked at all. But if the entity has a TrackingState
property, Trackable Entities (used by URF.Core) can look at the state (Unchanged, Added, Modified, Deleted) and then inform EF Core about it (using DbContext.ApplyChanges
) by setting the entity's State
property. And it can do this without making a round trip to the database. Otherwise, you would have to retrieve the entity from the database, at which point the entity is attached to the EF change tracker, and then manually update it within your service, which is not ideal.
Does this make sense?
This question seems to have been answered.
Hi Tony and sorry for reopen the case! but should i must be update the trackingstate on the client and send it to the server for this functionality?
Hello, as EF Core already providing the automatic state tracking, why do we need to implement trackable entity? I am not sure if I am missing something here. please shed some light on this area for my better understanding. Thanks in advance, Krishna.