Exemplo n.º 1
0
        private void InitializeServices(DataContextOptions options)
        {
            // Each DataContext has it's own set of services and provider.
            _services = new ServiceCollection();

            // Add the services required for the specific relational options.
            options.AddServices(_services);

            _serviceProvider = _services.BuildServiceProvider();

            // Initialize the DbContextService for this context
            _contextService = _serviceProvider.GetRequiredService <IDataContextService>();
            _contextService.Initialize(this);
        }
Exemplo n.º 2
0
 public TestContextFactory(DataContextOptions <TestContext> options) : base(options)
 {
 }
Exemplo n.º 3
0
 /// <summary>
 /// Constructs a new DataContext with the provided <see cref="DataContextOptions"/>.
 /// </summary>
 /// <param name="options"></param>
 public DataContext(DataContextOptions options)
 {
     Options = options ?? throw new ArgumentNullException(nameof(options));
 }
Exemplo n.º 4
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="options"></param>
 protected DataContextFactory(DataContextOptions <TContxt> options)
 {
     this.options = options;
 }
Exemplo n.º 5
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="options"></param>
 public LightDataContextFactory(DataContextOptions <DataContext> options) : base(options)
 {
 }
Exemplo n.º 6
0
 public DataContextOptionsBuilder(DataContextOptions <TContext> options)
     : base(options)
 {
 }
 public SimpleDataContext(DataContextOptions options) : base(options)
 {
     Addresses = new EntitySet <Address>(this);
 }
Exemplo n.º 8
0
 public TodoDataContext(DataContextOptions options) : base(options)
 {
     // Add your entity sets to the context in the data context constructor.
     TodoItems = new EntitySet <TodoItem>(this);
 }
 public DataContextOptionsBuilder()
 {
     Options = new DataContextOptions();
 }
Exemplo n.º 10
0
 public TestDataContext(DataContextOptions options) : base(options)
 {
     Products  = new EntitySet <Product>(this);
     Suppliers = new EntitySet <Supplier>(this);
     Parts     = new EntitySet <Part>(this);
 }
Exemplo n.º 11
0
 public TestRepo(RepositoryOptions options, DataContextOptions dataContextOptions, DbTransaction transaction) : base(options, dataContextOptions, transaction)
 {
 }
Exemplo n.º 12
0
 public TestRepo(RepositoryOptions options, DataContextOptions dataContextOptions) : base(options, dataContextOptions)
 {
 }
Exemplo n.º 13
0
 public ExpressionFieldNamePicker(DataContextOptions options) : base(options)
 {
     OptionsBehavior.AllowExpandOnDblClick = false;
 }
Exemplo n.º 14
0
 public TestExtendContext(DataContextOptions <TestContext> options) : base(options)
 {
 }