MVC3:无法为我的模型类检索元数据时,我想从accesse控制器模型数据 [英] MVC3:unable to retrieve metadata for my model class when i want to accesse model data from controller
问题描述
我是新来asp.net MVC3平台我下面这是发布在asp.net网站上的教程:
<一href=\"http://www.asp.net/mvc/tutorials/getting-started-with-aspnet-mvc3/getting-started-with-mvc3-part1-cs\">http://www.asp.net/mvc/tutorials/getting-started-with-aspnet-mvc3/getting-started-with-mvc3-part1-cs
但在第五步,我需要从控制器我面临一些麻烦访问我的模型类的数据,我已经创建模型类和环境类,但是当我想用脚手架模板来创建一个控制器类(控制器与读/写使用实体框架的行动和观点),它给了我下面的错误:
无法检索元数据'我modelclass的全名。
配置系统初始化失败
块引用>解决方案只要改变你的连接字符串提供者类型为
System.Data.SqlClient的
I am new to asp.net MVC3 platform i am following the tutorial which is posted on the asp.net website: http://www.asp.net/mvc/tutorials/getting-started-with-aspnet-mvc3/getting-started-with-mvc3-part1-cs
But in the fifth step which i need to access my model class data from a controller i am facing some troubles, i have created model class and the context class but when i want to create a controller class using the scaffolding template(controller with read/write actions and views using entity framework) it gives me an error as below:
unable to retrieve metadata for 'full name of my modelclass'. Configuration system failed to initialize
解决方案Just change your connection string provider type to
System.Data.SqlClient
这篇关于MVC3:无法为我的模型类检索元数据时,我想从accesse控制器模型数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!