聚合钥匙丢失MVC(Syndication keys missing MVC)

2019-10-19 13:29发布

真的需要一些帮助,这一个....我试图让我的MVC应用程序使用聚合库我的节目的RSS阅读器部分,同时努力使移民说,卡住了:

RssProject.Models.SyndicationPerson: : EntityType 'SyndicationPerson' has no key     defined. Define the key for this EntityType.
RssProject.Models.SyndicationElementExtension: : EntityType 'SyndicationElementExtension' has no key defined. Define the key for this EntityType.
RssProject.Models.SyndicationCategory: : EntityType 'SyndicationCategory' has no key defined. Define the key for this EntityType.
RssProject.Models.SyndicationLink: : EntityType 'SyndicationLink' has no key defined. Define the key for this EntityType.
SyndicationContents: : The referenced EntitySet 'SyndicationContents' for End 'SyndicationItem_Copyright_Target' could not be found in the containing EntityContainer.
SyndicationContents: : The referenced EntitySet 'SyndicationContents' for End 'SyndicationFeed_Copyright_Target' could not be found in the containing EntityContainer.
SyndicationContents: : The referenced EntitySet 'SyndicationContents' for End 'SyndicationFeed_Description_Target' could not be found in the containing EntityContainer.
SyndicationContents: : The referenced EntitySet 'SyndicationContents' for End   'SyndicationFeed_Title_Target' could not be found in the containing EntityContainer.
SyndicationContents: : The referenced EntitySet 'SyndicationContents' for End 'SyndicationItem_Summary_Target' could not be found in the containing EntityContainer.
SyndicationContents: : The referenced EntitySet 'SyndicationContents' for End 'SyndicationItem_Title_Target' could not be found in the containing EntityContainer.
SyndicationPersons: EntityType: EntitySet 'SyndicationPersons' is based on type 'SyndicationPerson' that has no keys defined.
SyndicationElementExtensions: EntityType: EntitySet 'SyndicationElementExtensions' is based on type 'SyndicationElementExtension' that has no keys defined.
SyndicationCategories: EntityType: EntitySet 'SyndicationCategories' is based on type 'SyndicationCategory' that has no keys defined.
SyndicationLinks: EntityType: EntitySet 'SyndicationLinks' is based on type 'SyndicationLink' that has no keys defined.
SyndicationContents: EntityType: EntitySet 'SyndicationContents' is based on type 'SyndicationContent' that has no keys defined.

(我有我使用Web客户端使用一个简单的饲料阅读功能的聚合之前添加,但所以我决定要切换到联合它不支持某些XML类型。)

我的头脑风暴和愤怒搜索的最后几个小时在网上找到一些帮助,但没有成功..已经下降旧的数据库,并做出努力“ 更新数据库-force”相同的结果后,一个新的。

认为这可能是是与实体框架 ,但它更新到最新版本。

这是我的课:

public class Feeds
{
    [Key]
    public int FeedId { get; set; }
    public SyndicationItem Feed { get; set; }

    public int SiteId { get; set; }
}

编辑:指出,我显然是使用代码首先迁移

任何帮助将超过赞赏!

文章来源: Syndication keys missing MVC