Can LINQPad run SQL Queries on OData?
I can run LINQ queries successfully to retrieve data from OData providers. I'm not able 开发者_开发百科to run SQL queries with OData. Since I'm behind who knows how many firewalls at work, I'm not sure if it's LINQPad or a firewall issue of some sort.
It doesn't make sense to run SQL queries with OData, because SQL is not the language that OData uses.
To query OData, you need to use the Uri protocol described here, or Microsoft's LINQ provider (which translates LINQ queries into the Uri protocol described).
If you run a LINQ query in LINQPad with an OData connection, you'll see the Uri to which it translates if you click the 'SQL' tab.
精彩评论