创建控制器时MVC出错 - 代码优先 [英] Error in MVC when create controller - Code First

查看:84
本文介绍了创建控制器时MVC出错 - 代码优先的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好

我有创建MVC APP代码时的问题首先



i创建模型和Context和Initializer,以及设置Webconfig文件



但是当创建控制器时我发现此消息





< big>错误

运行所选代码生成器时出错:

'无法检索'nameofApp.model.class'的元数据。

部分每个配置文件只能出现一次。请参阅帮助主题< location> for Exception。

(c:\ usersrs \ nameofdevice \ AppData \ local \ temp-mpCD0C.tmp第20行

Hello
I Have Probelm When Create MVC APP code First

i create models and Context And Initializer, and Set Webconfig File

But When Create Controller i find this message

"""
Error
There was an error running the selected code generator :
'unable to retrieve metadata for 'nameofApp.model.class'.
sections must only appear once per config file. see the help topic<location> for Exception.
(c:\users\nameofdevice\AppData\local\temp-mpCD0C.tmp line 20 )

"""

推荐答案

You are trying to use multiple section in config file



部分 - 必须只出现一次每个配置文件 - 为什么


sections-must-only-appear-once-per-config-file-why

See the link and your problem will be solved


这篇关于创建控制器时MVC出错 - 代码优先的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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