예제 #1
0
        static void Main(string[] args)
        {
            libDados.NORTHEntities ct = new libDados.NORTHEntities();

            var res = (from x in ct.Customers.Include(x => x.Orders)
                       select x);

            var res2 = res.ToList();

            HintsInterceptor.Add(new ReadPast());
            HintsInterceptor.Add(new RepeatableRead());
            HintsInterceptor.Add(new Recompile());

            var res3 = res.ToList();

            HintsInterceptor.Clear();

            HintsInterceptor.Add(new ReadPast()
            {
                TableName = "Orders"
            });
            HintsInterceptor.Add(new RepeatableRead()
            {
                TableName = "Customers"
            });
            HintsInterceptor.Add(new Recompile());

            var res4 = res.ToList();

            HintsInterceptor.Clear();

            HintsInterceptor.Add(new ReadPast());
            HintsInterceptor.Add(new RepeatableRead()
            {
                TableName = "Customers"
            });
            HintsInterceptor.Add(new Recompile());

            var res5 = res.ToList();

            HintsInterceptor.Clear();
        }
예제 #2
0
 public HintBase()
 {
     HintsInterceptor.Add(this);
 }