public CSCRepositoryBase(CountryStateCityDbContext ctx)
        {
            DbContext = ctx;

            // Disable lazy loading - if not, related properties are auto-loaded when
            // they are accessed for the first time, which means they'll be included when
            // we serialize (b/c the serialization process accesses those properties).

            // We don't want that, so we turn it off.  We want to eagerly load them (using Include) manually.

            // ctx.Configuration.LazyLoadingEnabled = false;

            // if (System.Diagnostics.Debugger.IsAttached)
            // {   // Write EF queries to the output console.
            // ctx.Database.Log = x => System.Diagnostics.Debug.WriteLine(x);
            // }
        }
Ejemplo n.º 2
0
 public CSCRepository(CountryStateCityDbContext ctx) : base(ctx)
 {
 }