Ⅰ 怎麼寫關於「IN」操作符的SQL語句的參數化命令
根據你說的描述,應該是EntityFramework(實體框架)、LinqToSQL或者Lamda表達式,關鍵是Linq。下面我給你點示例代碼你看是不是。public void LinqToSqlGroupBy04() { var q = from p in db.Procts group p by p.CategoryID into g select new { g.Key, AveragePrice = g.Average(p => p.UnitPrice) }; ObjectDumper.Write(q, 1);}public void LinqToSqlWhere05() { var q = db.Procts.Where(p=>p.UnitPrice > 10m).Where(p=>p.Discontinued); ObjectDumper.Write(q, 0);}