从MVC 2调用存储过程 [英] Calling stored procedure from MVC 2
问题描述
列表< CFLaborPayModel > LaborPayList =(来自e中aCDC.SP_CFLaborPayment(dt,)
aCDC.SP_CFLaborPayment(dt,RCL6)
dt是日期时间变量。
和RCL6是一个字符串变量
我试图从我的MVC 2应用程序调用存储过程。
但是我收到以下错误。
找不到源类型'int'的查询模式的实现。'select'not found
但在我的程序中我我正在返回数据。
但我得到int作为返回值。
提前致谢。
这是我的代码
ALPL_PORTALEntities _entities = new ALPL_PORTALEntities();
DateTime dt = Convert.ToDateTime(10/06 / 2013);
AlplClassesDataContext aCDC = new AlplClassesDataContext();
List< cflaborpaymodel> LaborPayList =(来自e中aCDC.SP_CFLaborPayment(dt,)
aCDC.SP_CFLaborPayment(dt,RCL6)
选择新的CFLaborPayModel
{
GodownID = e.GodownId,
承包商= e.contractor,
ActivityDate = e .Activity_Date,
材料= e.Material,
})。ToList();
返回LaborPayList;
}
检查这个
使用ASP.NET MVC 2存储过程 [ ^ ]
mkjgnjkk kmjmllpo jkkjnjmmmkl; ,
List<CFLaborPayModel> LaborPayList=(from e in aCDC.SP_CFLaborPayment(dt,"")
aCDC.SP_CFLaborPayment(dt, "RCL6")
dt is a datetime variable.
and RCL6 is a string variable
I am trying to call stored procedure from my MVC 2 application.
but I am getting the following error.
could not find an implementation of the query pattern for source type 'int'. 'select' not found
but In my procedure I am returining data.
But I am getting int as return value.
Thanks in advance.
here is my code
ALPL_PORTALEntities _entities = new ALPL_PORTALEntities();
DateTime dt = Convert.ToDateTime(10 / 06 / 2013);
AlplClassesDataContext aCDC = new AlplClassesDataContext();
List<cflaborpaymodel> LaborPayList=(from e in aCDC.SP_CFLaborPayment(dt,"")
aCDC.SP_CFLaborPayment(dt, "RCL6")
select new CFLaborPayModel
{
GodownID = e.GodownId,
Contractor = e.contractor,
ActivityDate = e.Activity_Date,
Material = e.Material,
}).ToList();
return LaborPayList;
}
Check this
store procedures with ASP.NET MVC 2[^]
mkjgnjkk kmjmllpo jkkjnjmmmkl;,
这篇关于从MVC 2调用存储过程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!