Beispiel #1
0
 public void RegisterUpdate(DomainObjectBase domainObject)
 {
     RegisterUpdate(new[] { domainObject });
 }
Beispiel #2
0
        private void AddWork(DomainObjectBase domainObject, Action<DomainObjectBase> operation)
        {
            Assert(domainObject);

             var unitOfWork = new UnitOfWork
             {
            DomainObject = domainObject,
            Operation = operation
             };

             _work.Add(unitOfWork);
        }
Beispiel #3
0
 public void RegisterInsert(DomainObjectBase domainObject)
 {
     RegisterInsert(new [] { domainObject });
 }
Beispiel #4
0
 private void Update(DomainObjectBase domainObject)
 {
     CreateTableIfNecessary(domainObject.GetType());
      domainObject.LastModified = GetLastModified();
      Connection.Update(domainObject);
 }
Beispiel #5
0
 private void Delete(DomainObjectBase domainObject)
 {
     CreateTableIfNecessary(domainObject.GetType());
      Connection.Delete(domainObject.Id);
 }
Beispiel #6
0
 private void Assert(DomainObjectBase domainObject)
 {
     if (domainObject == null)
      {
     throw new ArgumentNullException(nameof(domainObject));
      }
 }
Beispiel #7
0
 protected bool Equals(DomainObjectBase other)
 {
     return string.Equals(Id, other.Id);
 }