Translate OData queries to SQL

家住魔仙堡 提交于 2019-12-06 08:01:19

I wrote a package to convert OData queries into IQueryable objects that can be used to directly query the underlying database. You still need to provide metadata about the table, but it can be passed at runtime rather than requiring a POCO.

As far as generating SQL goes, the returned IQueryable objects are EntityFramework ObjectQuery objects, so you can just call ToString() to show the SQL, but there is currently no way to retrieve the parameters and associated values, so you're just better off using the generated IQueryable to directly query the database.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!