How do you write a parameterized where-in raw sql query in Entity Framework? I\'ve tried the following:
string dateQueryString = String.Join(\",\", chartMode
I'd write a stored proc instead which accepts your parameters, then add the proc to your edmx.
Then, in the edmx -> Model Browser -> Function Imports -> ... change the return type of the stored proc to SPCDataSeqCntInfo.
Entity framework will then take care of passing in your parameters.
e.g.
public static List GetSPCDataSeqCntInfo(DateTime dateParam, string lineCode, int modelNum, int equipmentNumber, int lotNum)
{
using (var db = new NameOfMyEntites())
{
return db.sp_GetSPCDataSeqCntInfo(dateParam, lineCode, modelNum, equipmentNumber, lotNum).ToList();
}
}