/// <summary> /// Disposes the resources of the entity manager. Do not call this method explicitly. /// </summary> /// <param name="disposing">Determines if the resources are being disposed.</param> protected virtual void Dispose(bool disposing) { if (!_isDisposed) { if (disposing) { if (Repository != null) { Repository.Dispose(); Repository = null; } } _isDisposed = true; } }
/// <summary> /// Creates an instance of the <see cref="IDaEntityRepository{TKey, TEntity}"/> class. /// </summary> /// <param name="repository">The repository to be used by the entity manager.</param> public DaEntityManagerBase(IDaEntityRepository <TKey, TEntity> repository) { Repository = repository ?? throw new ArgumentNullException("repository"); }