xamarin.android - Join tables efficiency on Linq -


i'm beginner in linq , have observed inner join query slower , less efficient than, example, crossing tables in code. furthermore, these data charged in listview lighter.

here code:

public static ienumerable<alumno> getitems()  {         return (from gal in me.table<grupoalumno>()                 join alu in me.table<alumno>()                 on gal.idalumno equals alu.id                 select alu); } 

how possible?

thank you.

i disagree existing accepted answer!

linq not operate on ienumerable<t> - can operate on iqueryable<t> , when linq statement executed in query language such sql. in case, linq similar in performance operating directly in sql, has other advantages compile time type checking , intellisense.

i agree @anders whenever facing performance issues measuring happening first step - i'd disagree "linq not way go" - i'd opposite - "linq way go" please make sure measure , understand happening - sql, it's easy linq query doing didn't expect!


Comments

Popular posts from this blog

delphi - How to convert bitmaps to video? -

jasper reports - Fixed header in Excel using JasperReports -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -