Fix: Repository Always Save Changes
Non-model/Relationship entities (eg. Device Component SubTypes) aren't included in the Changes, so always call base.SaveChanges.
This commit is contained in:
@@ -76,10 +76,10 @@ namespace Disco.Data.Repository
|
||||
// Notify before changes are committed
|
||||
var changes = Monitor.RepositoryMonitor.BeforeSaveChanges(this);
|
||||
|
||||
changeCount = base.SaveChanges();
|
||||
|
||||
if (changes.Length > 0)
|
||||
{
|
||||
changeCount = base.SaveChanges();
|
||||
|
||||
// Notify after changes are committed
|
||||
Monitor.RepositoryMonitor.AfterSaveChanges(this, changes);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user