C# MVC开发中在使用ADO.NET数据模型时出现的问题
ExceptionDetails:System.InvalidOperationException:Thetype'User'isnotattributedwithEdm...
Exception Details: System.InvalidOperationException: The type 'User' is not attributed with EdmEntityTypeAttribute but is contained in an assembly attributed with EdmSchemaAttribute. POCO entities that do not use EdmEntityTypeAttribute cannot be contained in the same assembly as non-POCO entities that use EdmEntityTypeAttribute.
Model.edmx中有一个"Code Generation Strategy"的属性,将其设置为default时会出现以上问题,将其设置为None时,会出现以下的异常:
Message 4 The table/view 'OnlineShop.dbo.LineItem' does not have a primary key defined. The key has been inferred and the definition was created as a read-only table/view. E:\Project\DotNet\WebSite1\App_Code\Model.edmx 0 1 WebSite1(1) 展开
Model.edmx中有一个"Code Generation Strategy"的属性,将其设置为default时会出现以上问题,将其设置为None时,会出现以下的异常:
Message 4 The table/view 'OnlineShop.dbo.LineItem' does not have a primary key defined. The key has been inferred and the definition was created as a read-only table/view. E:\Project\DotNet\WebSite1\App_Code\Model.edmx 0 1 WebSite1(1) 展开
光点科技
2023-08-15 广告
2023-08-15 广告
通常情况下,我们会按照结构模型把系统产生的数据分为三种类型:结构化数据、半结构化数据和非结构化数据。结构化数据,即行数据,是存储在数据库里,可以用二维表结构来逻辑表达实现的数据。最常见的就是数字数据和文本数据,它们可以某种标准格式存在于文件...
点击进入详情页
本回答由光点科技提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询