linq2db / linq2db.LINQPad

linq2db.LINQPad is a driver for LINQPad.
MIT License
74 stars 23 forks source link

Sorted properties from custom context #57

Closed RoyChase closed 2 years ago

RoyChase commented 3 years ago

Sorted properties from custom context Fixed typo in ConnectionDialog label

Fixes #56

dnfadmin commented 3 years ago

CLA assistant check
All CLA requirements met.

RoyChase commented 3 years ago

It's not column ordinal as it doesn't make a call to the database when generating the tree. From some test I am doing it looks to be in the order that the properties are in the source (which is logical) but I doesn't always seem to be this way as the context I was originally trying this with has the properties in alphabetic order. I don't have this to had today but I'll do some more tests to confrm this and that the fix actually works. Leave it with me.

MaceWindu commented 3 years ago

Ah, you are right. Here we load columns using reflection.

Usually it is ordered by declaration order in source code due to implementation, but as it documented here it is not always true :)