【发布时间】:2021-03-03 06:50:35
【问题描述】:
如何更改 EF Core 5 创建的连接表的名称?
例如
public class Food
{
public int FoodId { get; set; }
public string Name { get; set; }
public string Description { get; set; }
public string Ingredients { get; set; }
public string PhotoPath { get; set; }
public ICollection<Menu> Menus { get; set; }
}
public class Menu
{
public int MenuId { get; set; }
[Column(TypeName = "date")]
public DateTime MenuDate { get; set; }
public bool IsPublished { get; set; }
public ICollection<Food> Foods { get; set; }
}
以及这两个名为 FoodMenu 的实体的连接表,我想将其更改为其他内容..
【问题讨论】:
标签: c# entity-framework-core ef-core-5.0