public void RegisterUpdate(DomainObjectBase domainObject) { RegisterUpdate(new[] { domainObject }); }
private void AddWork(DomainObjectBase domainObject, Action<DomainObjectBase> operation) { Assert(domainObject); var unitOfWork = new UnitOfWork { DomainObject = domainObject, Operation = operation }; _work.Add(unitOfWork); }
public void RegisterInsert(DomainObjectBase domainObject) { RegisterInsert(new [] { domainObject }); }
private void Update(DomainObjectBase domainObject) { CreateTableIfNecessary(domainObject.GetType()); domainObject.LastModified = GetLastModified(); Connection.Update(domainObject); }
private void Delete(DomainObjectBase domainObject) { CreateTableIfNecessary(domainObject.GetType()); Connection.Delete(domainObject.Id); }
private void Assert(DomainObjectBase domainObject) { if (domainObject == null) { throw new ArgumentNullException(nameof(domainObject)); } }
protected bool Equals(DomainObjectBase other) { return string.Equals(Id, other.Id); }