private ProductManagerDataContext(Func <IProductManagerChangeSetFactory> changeSetFactoryProvider)
        {
            _changeSetFactoryProvider = changeSetFactoryProvider ?? (() => new ProductManagerChangeSetFactory());

            _products          = CreateAndRegisterInternalEntitySet <Product>();
            _productCategories = CreateAndRegisterInternalEntitySet <ProductCategory>();
        }
Exemple #2
0
        public SimpleParentChildDataContext(Func <ISimpleParentChildDataService> dataServiceFactory, Func <ISimpleParentChildChangeSetFactory> changeSetFactoryProvider = null)
        {
            _dataServiceFactory = dataServiceFactory;

            _changeSetFactoryProvider = changeSetFactoryProvider ?? (() => new SimpleParentChildChangeSetFactory());

            _parentSet = CreateAndRegisterInternalEntitySet <Parent>();
            _childSet  = CreateAndRegisterInternalEntitySet <Child>();

            Initialize();
        }
        public ProductManagerDataContext(Func <IProductManagerDataService> dataServiceFactory, Func <IProductManagerChangeSetFactory> changeSetFactoryProvider = null)
        {
            _dataServiceFactory = dataServiceFactory;

            _changeSetFactoryProvider = changeSetFactoryProvider ?? (() => new ProductManagerChangeSetFactory());

            _products          = CreateAndRegisterInternalEntitySet <Product>();
            _productCategories = CreateAndRegisterInternalEntitySet <ProductCategory>();

            Initialize();
        }
Exemple #4
0
        public ConcurrencyTestDataContext(Func <IConcurrencyTestDataService> dataServiceFactory, Func <IConcurrencyTestChangeSetFactory> changeSetFactoryProvider = null)
        {
            _dataServiceFactory = dataServiceFactory;

            _changeSetFactoryProvider = changeSetFactoryProvider ?? (() => new ConcurrencyTestChangeSetFactory());

            _aRecords = CreateAndRegisterInternalEntitySet <ARecord>();
            _bRecords = CreateAndRegisterInternalEntitySet <BRecord>();
            _cRecords = CreateAndRegisterInternalEntitySet <CRecord>();

            Initialize();
        }
Exemple #5
0
        public NTierDemoDataContext(Func <INTierDemoDataService> dataServiceFactory, Func <INTierDemoChangeSetFactory> changeSetFactoryProvider = null)
        {
            _dataServiceFactory = dataServiceFactory;

            _changeSetFactoryProvider = changeSetFactoryProvider ?? (() => new NTierDemoChangeSetFactory());

            _users = CreateAndRegisterInternalEntitySet <User>();
            _blogs = CreateAndRegisterInternalEntitySet <Blog>();
            _posts = CreateAndRegisterInternalEntitySet <Post>();

            Initialize();
        }
        public TableInheritanceDemoDBDataContext(Func <ITableInheritanceDemoDBDataService> dataServiceFactory, Func <ITableInheritanceDemoDBChangeSetFactory> changeSetFactoryProvider = null)
        {
            _dataServiceFactory = dataServiceFactory;

            _changeSetFactoryProvider = changeSetFactoryProvider ?? (() => new TableInheritanceDemoDBChangeSetFactory());

            _people        = CreateAndRegisterInternalEntitySet <Person>();
            _addresses     = CreateAndRegisterInternalEntitySet <Address>();
            _demographics  = CreateAndRegisterInternalEntitySet <Demographic>();
            _employeeRoles = CreateAndRegisterInternalEntitySet <EmployeeRole>();

            Initialize();
        }