c# - Error at creating a List View template in MVC, stored procedure in ASP.NET MVC
问题描述
I am trying to create a listview template in ASP.NET MVC and fill it through a stored procedure model class from the database, I am using EF, however when I try to create the view the following error is displayed:
Unable to retrieve metadata for JobPortalCandidates.SP_CND_Positions_Result
The name of the stored procedure is SP_CND_Positions
.
View Template Wizard in VS:
View Name: Index
Template: List
Model Class: SP_CND_Positions_Result (JobPortalCandidatesMVC)
This is my controller
[Authorize]
public ActionResult Index()
{
CandidateEntities Positions = new CandidateEntities();
return View(Positions.SP_CND_Positions());
}
What's wrong with it?
Thanks in advance
解决方案
推荐阅读
- java - 使用 Fillo API 读取 Excel 文件
- php - 如何使用 PHP 从 openerp 获取销售订单送货地址
- jquery - 如何使用jquery读取存储在c盘中的json文件
- linux - 无法使用 sdkmanager cli (Linux Debian) 启动 Avd。错误:恐慌:AVD 系统路径损坏。检查您的 ANDROID_SDK_ROOT 值
- html - 页脚离开容器
- css - CSS 悬停过渡效果
- maven - Bitbucket 管道 - 找不到符号:类 UniversalDetector
- c - 停止子进程重复输出而不杀死
- c++ - CEF JS 加载错误(使用自定义方案)
- ruby - 来自 Ruby 的 Firestore - 无法加载默认凭据