/// <summary> /// Initializes a new instance of the <see cref="Repository<T>"/> class. /// </summary> /// <param name="dataCommandProvider">The data session.</param> /// <param name="objectFinder">The object finder.</param> /// <param name="repositoryStrictness">The strictness of the repository.</param> public Repository( IDataCommandProvider dataCommandProvider, IObjectFinder <T> objectFinder, RepositoryStrictness repositoryStrictness = RepositoryStrictness.Strict) { Guard.Will.ThrowException("No unit of work was available.").When(dataCommandProvider == null); this.DataCommandProvider = dataCommandProvider; this.objectFinder = objectFinder; this.repositoryStrictness = repositoryStrictness; }
public StrictAggregateRootTestModelRepository(IDataCommandProvider dataCommandProvider, IObjectFinder <AggregateRootTestModel> objectFinder) : base(dataCommandProvider, objectFinder, RepositoryStrictness.Strict) { }
/// <summary> /// Initializes a new instance of the <see cref="TestModelRepository"/> class. /// </summary> /// <param name="dataCommandProvider">The data session.</param> /// <param name="objectFinder">The object finder.</param> public TestModelRepository(IDataCommandProvider dataCommandProvider, IObjectFinder <TestModel> objectFinder) : base(dataCommandProvider, objectFinder, RepositoryStrictness.Open) { }