I have 2 POCO classes in EF
public class Product
{
public int Id { get; set; }
public String Name { get; set; }
public Category Category { get; set; }
}
public class Category
{
public int Id { get; set; }
public String Name { get; set; }
}
and I want to change the “Product.Category” column name in the database.
By default EF makes it like “Category_Id“
I need to change it to “Cat“. How Can I do that ? Preferably with Fluent API
1 Answer