LINQ to Entities does not recognize the method 'Int32 IndexOf(System.String, System.StringComparison)' method

后端 未结 4 1787
小蘑菇
小蘑菇 2021-02-19 22:30

I have executed a linq query by using Entityframework like below

GroupMaster getGroup = null;
getGroup = DataContext.Groups.FirstOrDefault(item => keyword.Ind         


        
4条回答
  •  太阳男子
    2021-02-19 23:27

    Instead you can use this method below for lowering the cases:

    var lowerCaseItem = item.ToLower();
    

    If your item is of type string. Then this might get you through that exception.

提交回复
热议问题