main
 1using System;
 2using gorilla.commons.utility;
 3
 4namespace momoney.database.transactions
 5{
 6    public class SaveOrUpdateFromDatabase<T> : DatabaseCommand where T : Identifiable<Guid>
 7    {
 8        readonly T entity;
 9
10        public SaveOrUpdateFromDatabase(T entity)
11        {
12            this.entity = entity;
13        }
14
15        public void run(DatabaseConnection connection)
16        {
17            connection.store(entity);
18        }
19    }
20}