惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园 - Franky
N
Netflix TechBlog - Medium
Google Online Security Blog
Google Online Security Blog
月光博客
月光博客
量子位
酷 壳 – CoolShell
酷 壳 – CoolShell
V
V2EX
腾讯CDC
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园 - 聂微东
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
M
MIT News - Artificial intelligence
Vercel News
Vercel News
The GitHub Blog
The GitHub Blog
Hugging Face - Blog
Hugging Face - Blog
博客园 - 【当耐特】
Apple Machine Learning Research
Apple Machine Learning Research
aimingoo的专栏
aimingoo的专栏
博客园 - 三生石上(FineUI控件)
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
MongoDB | Blog
MongoDB | Blog
H
Help Net Security
The Cloudflare Blog
Blog — PlanetScale
Blog — PlanetScale
F
Full Disclosure
G
Google Developers Blog
罗磊的独立博客
Jina AI
Jina AI
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Y
Y Combinator Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
J
Java Code Geeks
A
About on SuperTechFans
IT之家
IT之家
大猫的无限游戏
大猫的无限游戏
S
SegmentFault 最新的问题
有赞技术团队
有赞技术团队
GbyAI
GbyAI
雷峰网
雷峰网
T
The Blog of Author Tim Ferriss
The Register - Security
The Register - Security
U
Unit 42
D
Docker
Martin Fowler
Martin Fowler
L
LINUX DO - 热门话题
NISL@THU
NISL@THU
阮一峰的网络日志
阮一峰的网络日志
C
Cybersecurity and Infrastructure Security Agency CISA
博客园_首页
Google DeepMind News
Google DeepMind News

博客园 - RicoRui

【转让】看看有你喜欢的书籍嘛?--都是我翻过的。 TFS --- GrantBackup Plan Permissions Error 用户界面草图设计工具-工具包和资源 IIS URL Rewrite Model & ASP.NET Route Component ‘s Diff [转] LINQ Method cannot be translated into a store expression. Script# C# + Html5 =C3 [转]qUIpt:JavaScript Cache Library Project Calculation Rules Proposal for Delayed Script Execution 10个有用的网站访问分析工具 20个免费的seo页面分析工具 网站流量统计定义 Minify JavaScript On the Fly Agile -- Scrum Resource UML with VS2010 Ultimate [转]探究TFS 2010中的测试功能 技术债务 Windows Phone 7 Jump Start
Entity Framework 4 & 4.1
RicoRui · 2011-08-02 · via 博客园 - RicoRui

Entity Framework中的批量提交与事务处理

Entity Framework 4.1 Code First学习之路(二)

QA1:

布署EF 4.1时遇到此问题:

未能加载文件或程序集“Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null”或它的某一个依赖项。拒绝访问。

1.检查一下Web.Config中是否缺少

 <system.web>
    <compilation debug="true" targetFramework="4.0">
      <assemblies>
        <add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
      </assemblies>
    </compilation>

2.这时问题应该解决了一半,还会报一个错“用户 'IIS APPPOOL\ASP.NET v4.0' 登录失败。

  在iis管理器中——》应用程序池——》ASP.NET V4.0————》高级设置——》标识——》改为localSystem或者NetworkService。

3.如果还有问题,请参照“IIS APPPOOL\RwindRhine登录失败的解决方案

QA2:

EF4.1 报错:Unable to load the specified metadata resource

是因为以下数据配置有问题

<add name="DecisionAuthContext" connectionString="metadata=res://*/DecisionAuthModel.DecisionAuth.csdl|res://*/DecisionAuthModel.DecisionAuth.ssdl|res://*/DecisionAuthModel.DecisionAuth.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=10.1.249.38;initial catalog=ProjectDecision;persist security info=True;user id=mqpan;password=123456;multipleactiveresultsets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient" />


4.“Unable to update the EntitySet XXXXXX because it has a DefiningQuery and no element exists in the element to support the current operation.” is one of the errors you will eventually run into with the ADO.NET Entity Framework 1.0.

A Probable Cause

If a table doesn’t have a primary key defined, this error will occur when you’re trying to delete an object. The generated EDMX file should also generate a warning:

Warning 6002: The table/view ‘TABLENAME’ does not have a primary key defined. The key has been inferred and the definition was created as a read-only table/view.

A solution to this problem is simply adding a primary key to the table and update your EDMX model.