예제 #1
0
        // Default constructor
        public RepositoryBase()
        {
            ds = new ICTGWSContext();

            // Turn off the Entity Framework (EF) proxy creation features
            // We do NOT want the EF to track changes - we'll do that ourselves
            ds.Configuration.ProxyCreationEnabled = false;

            // Also, turn off lazy loading...
            // We do NOT want the serializer to dereference navigation properties
            // (because that would cause loops/cycles)
            ds.Configuration.LazyLoadingEnabled = false;
        }
예제 #2
0
        // Default constructor
        public RepositoryBase()
        {
            ds = new ICTGWSContext();

            // Turn off the Entity Framework (EF) proxy creation features
            // We do NOT want the EF to track changes - we'll do that ourselves
            ds.Configuration.ProxyCreationEnabled = false;

            // Also, turn off lazy loading...
            // We do NOT want the serializer to dereference navigation properties
            // (because that would cause loops/cycles)
            ds.Configuration.LazyLoadingEnabled = false;
        }