You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Entity attributes use string interpolation, and cannot be filtered using where #993
usingSystem;usingSystem.Collections.Generic;usingSystem.Data;usingSystem.Linq;usingSystem.Linq.Dynamic.Core;publicclassProgram{publicstaticvoidMain(){Test1();Console.ReadKey();}staticvoidTest1(){List<Persona>list=newList<Persona>();varnome=$"ciccio{2}";//nome use string interpolationlist.Add(newPersona{Nome="ciccio1",Eta=10});list.Add(newPersona{Nome=nome,Eta=11});IQueryable<Persona>ql=list.AsQueryable();ql=ql.Where("Nome = @0","ciccio1");Console.WriteLine("ciccio1 count:"+ql.Count());varfilter=list.FindAll(v =>v.Nome=="ciccio2");Console.WriteLine("ciccio2 count:"+filter.Count());//using findall can retrieve data,filter.Count = 1ql=ql.Where("Nome = @0","ciccio2");Console.WriteLine("ciccio2 count:"+ql.Count());//No data can be retrieved here,ql.Count = 0}}classPersona{publicintEta{get;set;}publicstringNome{get;set;}}
Activity