SubSonic 3 SimpleRepository 一对多

4
我该如何使用SimpleRepository在SubSonic 3中处理关系?例如:有一个作者和一本书(见下文),我希望当保存书籍时,分配给它的作者也能被保存。
[Serializable]
public class Book
{
    public int Id { get; set; }
    public string Title { get; set; }
    public Author Author { get; set; }
}

[Serializable]
public class Author
{
    public int Id { get; set; }
    public string Name { get; set; }
}
1个回答

1

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接