Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有这个查询:select lower(Name) from User
select lower(Name) from User
如何使用 linq to EF 避免用户 linq 反对。
var query = context.Users.Select(u => u.Name.ToLower());
实体框架可以将 String.ToLower 翻译成 SQL。该查询将被翻译为:
SELECT LOWER([Extent1].[Name]) AS [C1] FROM [dbo].[Users] AS [Extent1]