我有一个导航属性public virtual IUser<int> CreateBy { get; set; }
当我尝试添加迁移Add-Migration InitialMigration
时,出现以下错误:
导航属性“CreateBy”不是“Passo”类型的声明属性。验证它没有被明确地从模型中排除,并且它是一个有效的导航属性。
我的风格Passo
public class Passo : EntityNome, IAuditable
{
public virtual int? Ordem { get; set; }
public virtual Passo ProximoPasso { get; set; }
public virtual ICollection<User> Responsaveis { get; protected set; }
public virtual IList<CheckListItemTemplate> CheckListItens { get; protected set; }
public virtual DateTime CreateAt { get; protected internal set; }
public virtual IUser<int> CreateBy { get; set; }
public virtual DateTime? UpdateAt { get; protected set; }
public virtual IUser<int> UpdateBy { get; set; }
}