相关疑难解决方法(0)

实体框架 4:多对多关系 IQueryable 而不是 ICollection

大家,早安,

我正在尝试首先解决我在使用 EF 代码时遇到的问题。我的架构如下

   public class Article : IUrlNode 
{
    [Key]
    public Guid ArticleID { get; set; }
    public string Title { get; set; }
    public DateTime DateCreated { get; set; }
    public DateTime DateUpdated { get; set; }
    public string Summary { get; set; }
    [System.ComponentModel.DataAnnotations.InverseProperty("CategoryArticles")]
    public virtual IQueryable<Category> ArticleCategories { get; set; }

    public string FriendlyUrl
    {
        get;
        set;
    }
}
   [RouteChild("CategoryArticles")]
   public class Category : ContentNode
{
    public Guid ServiceId { get; set; }

    [System.ComponentModel.DataAnnotations.InverseProperty("ArticleCategories")]
    public virtual …
Run Code Online (Sandbox Code Playgroud)

c# entity-framework-4

2
推荐指数
1
解决办法
1820
查看次数

标签 统计

c# ×1

entity-framework-4 ×1