9
shouts

Parameterized IN clauses with ADO.NET and LINQ

published 163 days, 20 hours, 46 minutes ago posted by MikesdotnettingMikesdotnetting 164 days, 9 hours, 41 minutes ago
Tuesday, September 29, 2009 10:25:40 AM GMT Monday, September 28, 2009 9:31:07 PM GMT

Parameterized IN clauses with ADO.NET and LINQ   Since my article on using parameters for Preventing SQL Injection In ASP.NET, I have had a few emails asking how to do the same with an IN clause expression. In this entry, I explore a couple of ways to do this.

 

Just in case you don't know, IN() takes a subquery or expression. The expression is a comma-separated list of values, so the following SQL:SELECT * FROM Products WHERE CategoryID IN (1,4,8) will return all Products that have a...

category: ASP.NET | clicked: 69 | | source: www.mikesdotnetting.com | show counter code
tags: ADO.NET, Linq, sql IN, SQL Injection