阅读背景:

实体框架6投影生成等效于“Select *”的SQL,并且不生成WHERE子句

来源:互联网 

I'm maintaining an ASP.NET WebAPI2 application with Entity framework 6 and MSSQL server database. The IoC container is Castle Windsor. I have a method on my repository that I use to get some details for a user from DB. Since I don't need every column, I thought I'd use projection. The problem is that the generated SQL selects ALL the columns in my table. Here's the DbContextI'm maintaining an ASP.NET WebAPI2 application




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: