1 数据模型
论文与论文之间存在引用于被引用的关系,引用与被引是相对的,相互之间是多对多的关系。暂时想着使用两个列表来存储,Reference表示该论文引用其他的论文,Cited表示该论文被哪些论文引用了。
public class Paper { public string Title { set; get; } public string Issn { set; get; } public string Source { set; get; } public List<Paper> Reference { set; get; } public List<Paper> Cited { set; get; } public Paper() { Reference = new List<Paper>(); Cited = new List<Paper>(); }
2 需求
有100W的论文对象,要实现论文对象的保存与初始化,以及查询数据对象,查询需要根据引文关系。想了很久感觉没有思路,使用什么样的数据模型保存和才去什么方法查询?不知道ORM或者Enity Framework code first 能不能弄?