NHibernate and ASP.NET Binding to a IList of <Products>? -


i have started use nhibernate , quite happy until needed bind asp.net controls. having major issues binding gridview collection of products (ilist). in end forced right small routine convert ilist datatable. once in datatable worked flawlessy.

now has come time bind standard dropdownbox 1 field of collection (ilist) of products appears having issues again.

so has brought me conclusion must doing wrong?

i can't believe isn't possible bind asp.net controls collection (ilist) of class (in case products) returned nhibernate.

i appreciate feedback has on situation... @ loss

thank you

the problem not can't bind, because can. issues come when you're binding @ wrong time.

nhibernate supports laziness. if query lazy, , properties on returned objects lazy, values won't pulled database until items , properties referenced. if bind these controls in ui, values won't extracted until page gets rendered.

at point there chance have closed database connection.

the simple solution make sure data you're binding not lazily loaded.


Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

aspxgridview - Devexpress grid - header filter does not work if column is initially hidden -

c# - How to execute a particular part of code asynchronously in a class -