O'Reilly logo

NHibernate 3 Beginner's Guide by Gabriel N. Schenker

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action – Loading the list of all categories from the database

We want to add a list box to our application where we can display the list of all the categories that have been added to the database so far.

  1. Add another row to the CategoryGrid. In the first column of the new row, add a command button which we will use to trigger the loading of the category list. In the second column, we need to add a list box which will be used to display the list of the retrieved categories. The XAML fragment for the button and the list box should look similar to the following code snippet:
     <Button x:Name="btnLoadCategories" Content="Load Categories" Grid.Row="3" VerticalAlignment="Top" Click="btnLoadCategories_Click" /> <ListBox x:Name="lstCategories" Grid.Row="3" ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required