c# - 有没有办法二配置四路关系与两个二表
问题描述
我正在尝试迁移模型,但出现错误
由于关系约束,无法确定导航属性表示的关系。
我不知道如何配置这种关系
public class Currency
{
public int Id { get; set; }
public string Name { get; set; }
public string Code { get; set; }
public string Symbol { get; set; }
public string Notes { get; set; }
public ICollection<ExchangeRate> ExchangeRates { get; set; }
public virtual ICollection<ExchangeRate> QuotedExchangeRates { get; set; }
}
public class ExchangeRate
{
public int Id { get; set; }
public DateTime Date { get; set; }
public decimal Rate { get; set; }
public DateTime UpdatedDate { get; set; }
public Currency BaseCurrency { get; set; }
public Currency QuoteCurrency { get; set; }
}
详情查看:
解决方案
推荐阅读
- java - 在执行 docker-compose build 时遇到构建失败问题?
- javascript - FullCalendar 特定事件停止拖动
- vim - vim 8.2 的 unicode 问题
- javascript - 有什么方法可以自定义我的 PDF 输出(R Shiny)?
- c++ - 我是初学者,我不明白错误是什么。你能帮助女孩吗?
- html - Twitter时间线嵌入在IOS的微信内置浏览器上不显示
- mips - MIPS r3000 - 并行加载数据?
- r - 忽略 R 中的 NA 的列的每次更改都会增加 1
- python - 如何在 for 循环中获取 seaborn 的 distplot 的线拟合数据?
- abap - 按时间戳和日期列连接表?