I have this relation ship.
In both of this model I have a navigation properties, however I still don't know how to use them.
The Customer Model
public class Customer
{
public int Id { get; set; }
[Required]
public string FirstName { get; set; }
[Required]
public string LastName { get; set; }
[Required]
public int CustomerGroupId { get; set; }
public CustomerGroup CustomerGroup { get; set; }
}
Customer Group Model
public class CustomerGroup
{
public int Id { get; set; }
public string Name { get; set; }
public List<Customer> Customers { get; set; }
}
I want to display a list of customers along with their customer group name.
I have this query but its only giving the customer groups list but not the customers.
Changes to new query executing.
The CustomerGroup is null.



