summaryrefslogtreecommitdiff
path: root/product/database/transactions/ObjectDatabaseCommandRegistry.cs
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2009-10-23 13:09:04 -0600
committermo khan <mo@mokhan.ca>2009-10-23 13:09:04 -0600
commit9a3430b2a1f0445c0dbac703907762e225383421 (patch)
tree751d5742a199eae57ebb6d767e650bd6c803bdc3 /product/database/transactions/ObjectDatabaseCommandRegistry.cs
parentf76fe6ca01f3dc5fabc8bf16f299420ba9d7ef05 (diff)
renamed some components to something that is more descriptive.main
Diffstat (limited to 'product/database/transactions/ObjectDatabaseCommandRegistry.cs')
-rw-r--r--product/database/transactions/ObjectDatabaseCommandRegistry.cs18
1 files changed, 18 insertions, 0 deletions
diff --git a/product/database/transactions/ObjectDatabaseCommandRegistry.cs b/product/database/transactions/ObjectDatabaseCommandRegistry.cs
new file mode 100644
index 0000000..8b2d97e
--- /dev/null
+++ b/product/database/transactions/ObjectDatabaseCommandRegistry.cs
@@ -0,0 +1,18 @@
+using System;
+using gorilla.commons.utility;
+
+namespace momoney.database.transactions
+{
+ public class ObjectDatabaseCommandRegistry : DatabaseCommandRegistry
+ {
+ public DatabaseCommand prepare_for_deletion<T>(T entity) where T : Identifiable<Guid>
+ {
+ return new DeleteFromDatabase<T>(entity);
+ }
+
+ public DatabaseCommand prepare_for_flushing<T>(T entity) where T : Identifiable<Guid>
+ {
+ return new SaveOrUpdateFromDatabase<T>(entity);
+ }
+ }
+} \ No newline at end of file