我有一個實體在父子關係中引用自己。我需要找出如何使用代碼和流利的API來實現這一點。以下是我的實體課。 public class MenuItem
{
public int Id { get; set; }
public string LinkText { get; set; }
public string ControllerName { get; set; }
在構建遷移我收到以下錯誤: 無法確定按類型「位置」的導航屬性「Location.NorthLocation」表示的關係。要麼手動配置關係,要麼忽略模型中的該屬性。 的位置實體: public class Location
{
public Guid Id { get; set; }
public DateTime CreatedWhen { get; set; }
實體模型: public class DocumentType : CodeBase
{
[Required]
[MaxLength(100)]
public string Name { get; set; }
public TimeSpan? Productiontime { get; set; }
public bool IsDelive