ASP.NET MVC Search Page - Integer StartsWith On Linq + EF4

后端 未结 5 1729
谎友^
谎友^ 2021-01-03 16:58

So, in my last post I was asking how to build a dynamic search filter using LINQ and EF4 (See Here) and finally came up with the solution of building the expression as a str

5条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-03 17:09

    Any method calls in a LINQ to Entities query that are not explicitly mapped to a canonical function will result in a runtime NotSupportedException exception being thrown. 
    

    Check mapping canonical function here: http://msdn.microsoft.com/en-us/library/bb738681.aspx

    In this case, you can use Math function. (I don't think code first can use in product project at that time)

提交回复
热议问题