public class Role : AuditedAggregateRoot<Guid>
{
/// <summary>
/// 角色名称
/// </summary>
public string RoleName { get; protected set; }
/// <summary>
/// 菜单
/// </summary>
public virtual ICollection<RoleMenu> Menus { get; protected set; } = new Collection<RoleMenu>();
}
//删除代码
//await _roleRepository.DeleteAsync(id);
我换成OwnsMany配置方式,级联删除问题解决了。但是级联更新问题出现了