My question is this. Let's say I have a Category class and Product class. And they are implemented like this : Category :
public class Category { public Category() { this.Products = new ObservableCollection<Product>(); } public int CategoryId { get; set; } public string Name { get; set; } public virtual ObservableCollection<Product> Products { get; private set; } } And Product :
public class Product { public int ProductId { get; set; } public string Name { get; set; } public int CategoryId { get; set; } public virtual Category Category { get; set; } } My question is this. If their id names were both "Id", how could I set the same relationship between Category and Product? In this example I can easily put CategoryId in product because the IDs have different names. What if they had the same name? What should I do? Thanks.

[Column(Name="ID")]attribute to decorate yourProductIdandCategoryIdfields in their respective class definitions.