我有两个实体:
class User
{
public Guid UserId { get; set; }
}
class ActionLog
{
public Guid ActionLogId { get; set; }
public Guid UserId { get; set; }
public User User {get; set;}
}
当我将它们添加到EF Core数据上下文中时,按惯例在ActionLog.UserId上生成了一个外键,但是我只想记录没有关联的UserId。我不想级联删除和密钥检查。我该如何删除该约定?