コード例 #1
0
ファイル: UnitOfWorkRepository.cs プロジェクト: bouwe77/fmg
 public void RegisterUpdate(DomainObjectBase domainObject)
 {
     RegisterUpdate(new[] { domainObject });
 }
コード例 #2
0
ファイル: UnitOfWorkRepository.cs プロジェクト: bouwe77/fmg
        private void AddWork(DomainObjectBase domainObject, Action<DomainObjectBase> operation)
        {
            Assert(domainObject);

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

             _work.Add(unitOfWork);
        }
コード例 #3
0
ファイル: UnitOfWorkRepository.cs プロジェクト: bouwe77/fmg
 public void RegisterInsert(DomainObjectBase domainObject)
 {
     RegisterInsert(new [] { domainObject });
 }
コード例 #4
0
ファイル: UnitOfWorkRepository.cs プロジェクト: bouwe77/fmg
 private void Update(DomainObjectBase domainObject)
 {
     CreateTableIfNecessary(domainObject.GetType());
      domainObject.LastModified = GetLastModified();
      Connection.Update(domainObject);
 }
コード例 #5
0
ファイル: UnitOfWorkRepository.cs プロジェクト: bouwe77/fmg
 private void Delete(DomainObjectBase domainObject)
 {
     CreateTableIfNecessary(domainObject.GetType());
      Connection.Delete(domainObject.Id);
 }
コード例 #6
0
ファイル: UnitOfWorkRepository.cs プロジェクト: bouwe77/fmg
 private void Assert(DomainObjectBase domainObject)
 {
     if (domainObject == null)
      {
     throw new ArgumentNullException(nameof(domainObject));
      }
 }
コード例 #7
0
ファイル: DomainObjectBase.cs プロジェクト: bouwe77/fmg
 protected bool Equals(DomainObjectBase other)
 {
     return string.Equals(Id, other.Id);
 }