最近我使用实体框架将 ado.net .edmx
添加到我的 ASP.NET MVC项目中,但上下文中存在错误.cs
[DbFunction("Entities", "Split_Str")]
public virtual IQueryable<Split_Str_Result> Split_Str(string list, string splitChar)
{
var listParameter = list != null ?
new ObjectParameter("list", list) :
new ObjectParameter("list", typeof(string));
var splitCharParameter = splitChar != null ?
new ObjectParameter("splitChar", splitChar) :
new ObjectParameter("splitChar", typeof(string));
return ((IObjectContextAdapter)this).ObjectContext.CreateQuery<Split_Str_Result>("[Entities].[Split_Str](@list, @splitChar)", listParameter, splitCharParameter);
}
如果没有,请尝试添加using System.Linq;