【发布时间】:2014-06-24 14:57:22
【问题描述】:
我正在尝试向我的实体框架 where 子句添加 AND 条件,但我这样做的方式不起作用。谁能告诉我如何以正确的方式做到这一点?在添加 AND 条件之前,代码运行良好。
Dim myRecipeStepsHistory = myContext.RefineRecipeStep.Where("it.Recipe_Id=" & strRecipeId And "it.IngredientItemNumber=" & strIngredientNumber).FirstOrDefault()
我得到的错误是:
从字符串“it.Recipe_Id=11”到类型“Long”的转换无效。
非常感谢。
【问题讨论】:
标签: asp.net .net vb.net entity-framework