I have a database which is created using EF4.1 code first. The data context is as follow:
public DbSet<User> Users { get; set; }
public DbSet<Address> Addresses { get; set; }
I want to show address for a user by binding the users.Address to a datagrid in a ViewModel scenario. The problem is that I cannot convert Users.Address into a list that I can bind a collection into it. Any suggestion?
Here are some links on how to use the Local property of
DbSet<>for data binding.Using DbContext in EF 4.1 Part 7: Local Data
EF Feature CTP5: Code First Model with Master-Detail WPF Application