Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/sql-server/27.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 联合密钥缺少MVC_C#_Sql Server_Asp.net Mvc_Entity Framework_Asp.net Mvc 5 - Fatal编程技术网

C# 联合密钥缺少MVC

C# 联合密钥缺少MVC,c#,sql-server,asp.net-mvc,entity-framework,asp.net-mvc-5,C#,Sql Server,Asp.net Mvc,Entity Framework,Asp.net Mvc 5,我真的需要一些人帮忙。。。。 我正试图让我的MVC应用程序使用程序RSS提要阅读器部分的联合库,但在尝试启用迁移时遇到了问题,原因是: RssProject.Models.SyndicationPerson: : EntityType 'SyndicationPerson' has no key defined. Define the key for this EntityType. RssProject.Models.SyndicationElementExtension: : Ent

我真的需要一些人帮忙。。。。 我正试图让我的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; }
}
编辑:指出我显然使用代码优先迁移

任何帮助都将不胜感激