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
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.2.0521.1121")]
[assembly: AssemblyFileVersion("1.2.0521.1121")]
[assembly: AssemblyVersion("1.2.0521.1703")]
[assembly: AssemblyFileVersion("1.2.0521.1703")]
+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);
}