Integer Contains Using Linq

前端 未结 2 1180
长发绾君心
长发绾君心 2020-12-14 21:56

I\'m having some difficulty writing a linq query that will check whether the consecutive digits in an integer are contained in the primary key of a table. So, suppose there

2条回答
  •  失恋的感觉
    2020-12-14 22:27

    Try:

    var results = from e in myDbContext.Employees
      where SqlFunctions.StringConvert((double)e.Id).Contains(filter)
      select e;
    

提交回复
热议问题