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:
Gary Sharp
2013-05-21 17:06:56 +10:00
parent 7befaccf4a
commit 2bf4da5795
7 changed files with 14 additions and 14 deletions
+2 -2
View File
@@ -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);
}