Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7990949
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T13:09:10+00:00 2026-06-04T13:09:10+00:00

I am using NHibernate to pull some objects from my database: Dim RpList As

  • 0

I am using NHibernate to pull some objects from my database:

Dim RpList As List(Of ReferencePackage) = session.QueryOver(Of ReferencePackage).OrderBy(Function(x) x.Name).Asc.List

I then try to assign this collection as the datasource to a ListBox:

ReferencePackagesListBox.DataSource = RpList

When I do this, Visual Studio immediately stops debugging. I have a try/catch surrounding the DataSource assignment, and I have also disabled “Only my code” in the debugging options; it does not throw an exception.

I have another List of objects I am pulling from NHibernate as well that seem to bind to the ListBox just fine in this same way. I can only assume that the issue is with binding the objects to the control. I have tried assigning the DisplayMember and ValueMember before assigning the DataSource but it has not helped at all. I have also tried converting the IList from NHibernate to a BindingList but it still crashes.

Any help would be very appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T13:09:12+00:00Added an answer on June 4, 2026 at 1:09 pm

    It turns out the answer is the same as another question I have on here.

    Basically – binding NHibernate Proxy objects can behave strangely sometimes. Part of that strange behavior is that it can cause Visual Studio to stop debugging without throwing an exception, or giving any warning. The solution is to use a view class of your object and bind to the view.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've just started using NHibernate, and I have some issues that I'm unsure how
I am using nhibernate for my OR persistence and I store a list of
Using NHibernate 2.0: I have an object with some changes on it and I
I am using NHibernate 3.2.1. The following query return session.Query<TmTranslation>() .Where(x => x.TranslationUnit.Document.Job ==
I'm using NHibernate as my ORM. I have a situation where I have some
I'm using NHibernate 3.0.0 and the new feature lazy properties. However, in some queries
I've a sequence defined in my Oracle database. Can I pull from this sequence
Using NHibernate with ASP.NET 4. I have had no issues retrieving objects, but I've
When using NHibernate you need to provide some mapping files with the name .hbm.xml
I am using NHibernate to map a class to a database table. The Part

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.