猿问

LINQ包含不区分大小写的

此代码区分大小写,如何使其不区分大小写?


public IQueryable<FACILITY_ITEM> GetFacilityItemRootByDescription(string description)

{

    return this.ObjectContext.FACILITY_ITEM.Where(fi => fi.DESCRIPTION.Contains(description));

}


POPMUISE
浏览 791回答 3
3回答

摇曳的蔷薇

fi => fi.DESCRIPTION.ToLower().Contains(description.ToLower())
随时随地看视频慕课网APP
我要回答