无法确定存储版本 - 实体框架 [英] Could not determine storage version - Entity Framework

查看:104
本文介绍了无法确定存储版本 - 实体框架的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我目前的解决方案中,我正在单独的项目中实现代码优先模式。因为我这样做,我初始化我的连接字符串在 DbContext 我得到这个奇怪的错误:


无法确定存储版本;需要有效的存储连接或
版本提示。


我正在使用Entity Framework 5.0.0.0,其余的我的解决方案项目工作非常好,因为他们使用 EDMX 文件进行数据库访问,但只有我的代码第一个项目抛出了这个异常。它是什么,为什么?

解决方案

当我将Entity Framework升级到实体框架6.1 .2。



像魅力一样工作!


I'm implementing code first pattern in a separate project in my current solution. Since I did this and I initialize my connection string in DbContext I get this weird error:

Could not determine storage version; a valid storage connection or a version hint is required.

I'm using Entity Framework 5.0.0.0 and the rest of my solutions projects work great as they use EDMX files for database access yet only my code first project throws this exception. What is it and why?

解决方案

It seems problem got solved when I upgraded Entity Framework for every project using it to Entity Framework 6.1.2.

Works like a charm!

这篇关于无法确定存储版本 - 实体框架的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆