예제 #1
0
        private CosmosTestStore(
            string name, bool shared = true, string dataFilePath = null,
            Action <CosmosDbContextOptionsBuilder> extensionConfiguration = null)
            : base(CreateName(name), shared)
        {
            ConnectionUri    = TestEnvironment.DefaultConnection;
            AuthToken        = TestEnvironment.AuthToken;
            ConnectionString = TestEnvironment.ConnectionString;
            _configureCosmos = extensionConfiguration == null
                ? (Action <CosmosDbContextOptionsBuilder>)(b => b.ApplyConfiguration())
                : (b =>
            {
                b.ApplyConfiguration();
                extensionConfiguration(b);
            });

            _storeContext = new TestStoreContext(this);

            if (dataFilePath != null)
            {
                _dataFilePath = Path.Combine(
                    Path.GetDirectoryName(typeof(CosmosTestStore).Assembly.Location),
                    dataFilePath);
            }
        }
        private CosmosTestStore(string name, bool shared = true, string dataFilePath = null)
            : base(name, shared)
        {
            ConnectionUri = TestEnvironment.DefaultConnection;
            AuthToken     = TestEnvironment.AuthToken;

            _storeContext = new TestStoreContext(this);

            if (dataFilePath != null)
            {
                _dataFilePath = Path.Combine(
                    Path.GetDirectoryName(typeof(CosmosTestStore).GetTypeInfo().Assembly.Location),
                    dataFilePath);
            }
        }
예제 #3
0
        private CosmosTestStore(
            string name, bool shared = true, string dataFilePath = null, Action <CosmosDbContextOptionsBuilder> extensionConfiguration = null)
            : base(name + _runId.ToString(), shared)
        {
            ConnectionUri    = TestEnvironment.DefaultConnection;
            AuthToken        = TestEnvironment.AuthToken;
            _configureCosmos = extensionConfiguration;

            _storeContext = new TestStoreContext(this);

            if (dataFilePath != null)
            {
                _dataFilePath = Path.Combine(
                    Path.GetDirectoryName(typeof(CosmosTestStore).GetTypeInfo().Assembly.Location),
                    dataFilePath);
            }
        }
예제 #4
0
 public PersonRepository(TestStoreContext testStoreContext)
 {
     _testStoreContext = testStoreContext;
 }
예제 #5
0
 public CompanyRepository(TestStoreContext testStoreContext)
 {
     _testStoreContext = testStoreContext;
 }
 public AuthenticationRepository(TestStoreContext testStore)
 {
     _testStoreContext = testStore;
 }
예제 #7
0
 public DescriptionRepository(TestStoreContext testStore)
 {
     _testStoreContext = testStore;
 }
 public RealEstateRepository(TestStoreContext testStore)
 {
     _testStoreContext = testStore;
 }