Exemplo n.º 1
0
            protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
            {
                if (_useLazyLoadingProxies)
                {
                    optionsBuilder.UseLazyLoadingProxies();
                }

                if (_useChangeDetectionProxies)
                {
                    optionsBuilder.UseChangeDetectionProxies();
                }

                if (_internalServiceProvider != null)
                {
                    optionsBuilder.UseInternalServiceProvider(_internalServiceProvider);
                }

                optionsBuilder.UseInMemoryDatabase(_dbName ?? nameof(NeweyContext), _dbRoot);
            }
Exemplo n.º 2
0
 public override DbContextOptionsBuilder AddOptions(DbContextOptionsBuilder builder)
 => base.AddOptions(builder.UseChangeDetectionProxies());