ObjectQuery extensions from managed C++/CLI
I'm trying to move a project over to using Entity Framework, but to make it more fun, the project is in C++/CLR.

I've got a query 
    
    ObjectQuery<myData::Facility^>^ facQ = myContext->FacilitySet;

and I want to do this

    int n = facQ.Count()

But I can't because c++ doesn't recognise extension methods using C# syntax. facQ->Count() doesn't work.

http://stackoverflow.com/questions/1349674/using-c-sharp-extension-methods-from-managed-c-cli shows the answer for user-defined extensions; but in this case, the extension is part of the .NET framework http://msdn.microsoft.com/en-us/library/bb349034%28v=vs.90%29.aspx.

Any ideas?

(I'm using visual studio 2008, and .NET 3.5). 
ObjectQuery extensions from managed C++/CLI
===

I'm trying to move a project over to using Entity Framework, but to make it more fun, the project is in C++/CLR.

I've got a query 
    
    ObjectQuery<myData::Facility^>^ facQ = myContext->FacilitySet;

and I want to do this

    int n = facQ.Count()

But I can't because c++ doesn't recognise extension methods using C# syntax. facQ->Count() doesn't work.

http://stackoverflow.com/questions/1349674/using-c-sharp-extension-methods-from-managed-c-cli shows the answer for user-defined extensions; but in this case, the extension is part of the .NET framework http://msdn.microsoft.com/en-us/library/bb349034%28v=vs.90%29.aspx.

Any ideas?

(I'm using visual studio 2008, and .NET 3.5). 