EF's tracking behavior depends on the entry available in the change tracker; it is the default behavior. We could override this behavior to achieve performance improvements in certain scenarios where tracking is not required; for example, the read-only operations such as displaying a list of posts, displaying post information, and so on. This tracking is the key to EF in arriving at the changes required to be persisted during SaveChanges()
execution.
As discussed in the previous section, any query that returns an entity (registered in data context) will be a part of tracking. Also as mentioned about how persistence occurs, the changes performed on those entities will be tracked and those changes will be persisted during SaveChanges()
execution.
Let's look at the following code, which illustrates how tracking works in the framework:
public async Task<IActionResult> Edit(int id, [Bind("Id,FirstName, LastName,NickName,Url,Biography...