Example #1
0
            protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
            {
                if (_useLazyLoadingProxies)
                {
                    optionsBuilder.UseLazyLoadingProxies();
                }

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

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

                optionsBuilder.UseInMemoryDatabase(_dbName ?? nameof(NeweyContext), _dbRoot);
            }
 public override DbContextOptionsBuilder AddOptions(DbContextOptionsBuilder builder)
 => base.AddOptions(builder.UseChangeTrackingProxies());
 protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
 => optionsBuilder
 .UseChangeTrackingProxies()
 .UseInMemoryDatabase(GetType().ShortDisplayName());