最近我使用Entity Framework将ado.net .edmx
添加到我的ASP.NET MVC项目中,但context.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);
}
答案 0 :(得分:1)
如果还没有,请尝试添加using System.Linq;