ChangeTracker.HasChanges Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Checks if any new, deleted, or changed entities are being tracked such that these changes will be sent to the database if SaveChanges() or SaveChangesAsync(CancellationToken) is called.
public virtual bool HasChanges ();
abstract member HasChanges : unit -> bool
override this.HasChanges : unit -> bool
Public Overridable Function HasChanges () As Boolean
Returns
true if there are changes to save, otherwise false.
Remarks
Note that this method calls DetectChanges() unless AutoDetectChangesEnabled has been set to false.
Applies to
Feedback
Submit and view feedback for