Custom Method in LINQ to SQL query

前端 未结 3 1946
半阙折子戏
半阙折子戏 2020-12-04 02:29

Is it possible to use custom method In query for example:

var result = from u in context.MyTable where MyMethod(u) == 10 select u;
3条回答
  •  借酒劲吻你
    2020-12-04 03:10

    Yes, but if you are using Linq-to-Sql - your method has to have special code to handle to SQL conversion.

提交回复
热议问题