Linq to EF - Unsupported Functions

后端 未结 3 629
旧巷少年郎
旧巷少年郎 2020-12-21 06:47

I\'m making a query with Linq, backed by an Entity Framework datasource.

I\'m getting the following error:

LINQ to Entities does not recognize

3条回答
  •  無奈伤痛
    2020-12-21 07:21

    Please try

    var objects =
            from n in context.Products.Where(p => p.r == r)
            let a = Math.Pow((double)n.Latitude, 0.5)
            where a < 5
            orderby a
            select n;
    

提交回复
热议问题