具有视图的Mvc 5控制器,使用实体框架 [英] Mvc 5 controller with views, using entity framework

查看:102
本文介绍了具有视图的Mvc 5控制器,使用实体框架的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用Entity Framework为MVC5创建一个Controller。但我一直遇到一个错误。 无法检索元数据。它还说参数connectionString不能为空,空或包含空格。



我尝试过:



我试图重建。检查app Web Config下的connectionString。用数据填充表格。但我试过的似乎不起作用。你可以帮我吗?

I am trying to create a Controller for MVC5 using Entity Framework. but I keep encountering an error. 'Unable to retrieve metadata'. It also says The argument connectionString cannot be null, empty or contain White Space.

What I have tried:

I have tried to rebuild. Checked the connectionString under the app Web Config. Filled the table with data. But what I tried seems not to work. May you please help me?

推荐答案

我发现我的数据库表数据类型存在问题。
I found the problem it was with my database tables data types.


这篇关于具有视图的Mvc 5控制器,使用实体框架的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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