diff options
Diffstat (limited to 'product/database/transactions/SaveOrUpdateFromDatabase.cs')
| -rw-r--r-- | product/database/transactions/SaveOrUpdateFromDatabase.cs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/product/database/transactions/SaveOrUpdateFromDatabase.cs b/product/database/transactions/SaveOrUpdateFromDatabase.cs new file mode 100644 index 0000000..c8babda --- /dev/null +++ b/product/database/transactions/SaveOrUpdateFromDatabase.cs @@ -0,0 +1,20 @@ +using System; +using gorilla.commons.utility; + +namespace momoney.database.transactions +{ + public class SaveOrUpdateFromDatabase<T> : DatabaseCommand where T : Identifiable<Guid> + { + readonly T entity; + + public SaveOrUpdateFromDatabase(T entity) + { + this.entity = entity; + } + + public void run(DatabaseConnection connection) + { + connection.store(entity); + } + } +}
\ No newline at end of file |
