msdn example data developer center wpf master and detail window

Jan 2, 2014
Reaction score
Hi there,
anyone has tried this example for once
a link is not possible for me, so use google with this letters
"use the 'Object' OPtion for Creating WPF Data Sources" Data developer Center

There shall be a link to a msdn side

It works fine, but it does not show me any datas. For reasons that the 'load event' does not arrive this line: "_context.Categories.Load();"

When I debug it, it just pass it.
Then it shows me the window, all fine, but no datas.

This is not the whole Code, just those load event
 private void Window_Loaded(object sender, RoutedEventArgs e)

            System.Windows.Data.CollectionViewSource categoryViewSource =

           [COLOR=Green] // Load is an extension method on IQueryable, 
            // defined in the System.Data.Entity namespace.
            // This method enumerates the results of the query, 
            // similar to ToList but without creating a list.
            // When used with Linq to Entities this method 
            // creates entity objects and adds them to the context.

            // After the data is loaded call the DbSet<T>.Local property 
            // to use the DbSet<T> as a binding source.[/COLOR]
            categoryViewSource.Source = _context.Categories.Local;

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question