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()); }
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()); }
public void ConversionTest() { QueryMethods.CastEntity(new AdventureWorks()); try { QueryMethods.CastPrimitive(new AdventureWorks()); Assert.Fail(); } catch (InvalidOperationException exception) { Trace.WriteLine(exception); } QueryMethods.AsEnumerableAsQueryable(new AdventureWorks()); }
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(); }