I have columns in my database that EF put in for me, that are classname followed by _Id. However much of the documentation recommends that the naming convention for foreign
Every entity that holds a reference to another entity should have a property named ForeignEntityId
(note the lower case d in Id).
If you set up your entities following the exact pattern of this example, all your columns should be named according to convention:
public class Customer
{
public int Id { get; set; }
public string Name { get; set; }
public virtual ICollection<Order> Orders { get; set; }
}
public class Order
{
public int Id { get; set; }
public int CustomerId { get; set; } // this property is important
public string ProductName { get; set; }
public decimal Price { get; set; }
public virtual Customer Customer { get; set; }
}