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 // You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below: // by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.2.0521.1121")] [assembly: AssemblyVersion("1.2.0521.1703")]
[assembly: AssemblyFileVersion("1.2.0521.1121")] [assembly: AssemblyFileVersion("1.2.0521.1703")]
+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 // You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below: // by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.2.0521.1121")] [assembly: AssemblyVersion("1.2.0521.1703")]
[assembly: AssemblyFileVersion("1.2.0521.1121")] [assembly: AssemblyFileVersion("1.2.0521.1703")]
+2 -2
View File
@@ -76,10 +76,10 @@ namespace Disco.Data.Repository
// Notify before changes are committed // Notify before changes are committed
var changes = Monitor.RepositoryMonitor.BeforeSaveChanges(this); var changes = Monitor.RepositoryMonitor.BeforeSaveChanges(this);
changeCount = base.SaveChanges();
if (changes.Length > 0) if (changes.Length > 0)
{ {
changeCount = base.SaveChanges();
// Notify after changes are committed // Notify after changes are committed
Monitor.RepositoryMonitor.AfterSaveChanges(this, changes); Monitor.RepositoryMonitor.AfterSaveChanges(this, changes);
} }
+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 // You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below: // by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.2.0521.1121")] [assembly: AssemblyVersion("1.2.0521.1703")]
[assembly: AssemblyFileVersion("1.2.0521.1121")] [assembly: AssemblyFileVersion("1.2.0521.1703")]
+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 // You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below: // by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.2.0521.1121")] [assembly: AssemblyVersion("1.2.0521.1703")]
[assembly: AssemblyFileVersion("1.2.0521.1121")] [assembly: AssemblyFileVersion("1.2.0521.1703")]
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers // You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below: // by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.2.0521.1121")] [assembly: AssemblyVersion("1.2.0521.1703")]
[assembly: AssemblyFileVersion("1.2.0521.1121")] [assembly: AssemblyFileVersion("1.2.0521.1703")]
+2 -2
View File
@@ -31,5 +31,5 @@ using System.Runtime.InteropServices;
// //
// You can specify all the values or you can default the Revision and Build Numbers // You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below: // by using the '*' as shown below:
[assembly: AssemblyVersion("1.2.0521.1121")] [assembly: AssemblyVersion("1.2.0521.1703")]
[assembly: AssemblyFileVersion("1.2.0521.1121")] [assembly: AssemblyFileVersion("1.2.0521.1703")]