0

I want to pass 'A0101', 'A0201' this like a parameter in sql server query using in clause but from c# to a sp

TheGameiswar
  • 27,855
  • 8
  • 56
  • 94
Andres
  • 53
  • 2
  • 8

1 Answers1

0

If the "IN" clause is just being used to filter, you can use Linq without passing it into the stored procedure (it will still be evaluated on server with deferred execution).

 var results = (from item in context.SPCall
     where new[] {"A0101", "A0201"}.Contains(item.Property)
     select item).ToList();
Kyle McClellan
  • 664
  • 7
  • 23