예제 #1
0
        public void ConversionTest()
        {
#if NETFX
            QueryMethods.CastPrimitive(new AdventureWorks());
#else
            try
            {
                QueryMethods.CastPrimitive(new AdventureWorks());
                Assert.Fail();
            }
            catch (InvalidOperationException exception)
            {
                Trace.WriteLine(exception);
            }
#endif
#if NETFX
            try
            {
                QueryMethods.CastEntity(new AdventureWorks());
                Assert.Fail();
            }
            catch (NotSupportedException exception)
            {
                Trace.WriteLine(exception);
            }
#else
            QueryMethods.CastEntity(new AdventureWorks());
#endif
            QueryMethods.AsEnumerableAsQueryable(new AdventureWorks());
            QueryMethods.SelectLocalEntity(new AdventureWorks());
        }
예제 #2
0
        public void ConversionTest()
        {
//#if NETFX
//            QueryMethods.CastPrimitive(new AdventureWorks());
//#else
//            try
//            {
//                QueryMethods.CastPrimitive(new AdventureWorks());
//                Assert.Fail();
//            }
//            catch (InvalidOperationException exception)
//            {
//                Trace.WriteLine(exception);
//            }
//#endif
//#if NETFX
//            try
//            {
//                QueryMethods.CastEntity(new AdventureWorks());
//                Assert.Fail();
//            }
//            catch (NotSupportedException exception)
//            {
//                Trace.WriteLine(exception);
//            }
//#else
//            QueryMethods.CastEntity(new AdventureWorks());
//#endif
            QueryMethods.AsEnumerableAsQueryable(new AdventureWorks());
            QueryMethods.SelectLocalEntity(new AdventureWorks());
        }
예제 #3
0
 public void ConversionTest()
 {
     QueryMethods.CastEntity(new AdventureWorks());
     try
     {
         QueryMethods.CastPrimitive(new AdventureWorks());
         Assert.Fail();
     }
     catch (InvalidOperationException exception)
     {
         Trace.WriteLine(exception);
     }
     QueryMethods.AsEnumerableAsQueryable(new AdventureWorks());
 }
예제 #4
0
 public void ConversionTest()
 {
     try
     {
         QueryMethods.CastPrimitive(); // TODO.
         Assert.Fail();
     }
     catch (InvalidOperationException exception)
     {
         Trace.WriteLine(exception);
     }
     QueryMethods.CastEntity(); // TODO.
     QueryMethods.AsEnumerableAsQueryable();
     try
     {
         QueryMethods.SelectEntities();
         Assert.Fail();
     }
     catch (NotSupportedException exception)
     {
         Trace.WriteLine(exception);
     }
     QueryMethods.SelectEntityObjects();
 }