My Code:
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);
This code produces an error:
additional information: Parameter '@t1' specified but none of the passed arguments have a property with this name (in 'SELECT......
I wish to know what the correct syntax is?
var results = db.Fetch<Person>(sql, new {t1, t2});
– Ocker