【发布时间】:2016-03-17 20:10:00
【问题描述】:
我的代码:
string sql = "SELECT * FROM people where birthday >= @t1 AND birthday <= @t2"
DateTime t1 = DateTime.Parse("01-01-2000");
DateTime t2 = DateTime.Parse("01-01-2001");
var results = db.Fetch<Person>(sql, t1,t2);
此代码产生错误:
additional information: Parameter '@t1' specified but none of the passed arguments have a property with this name (in 'SELECT......
我想知道正确的语法是什么?
【问题讨论】: