7,655
社区成员
发帖
与我相关
我的任务
分享
public List<T> Select<T>(string statement) where T : new()
{
try
{
Open();
SQLiteCommand cmd = db.CreateCommand(statement);
var list = cmd.ExecuteQuery<T>();
return list.ToList(); //执行到这一句的时候抛出了异常
}
catch (SQLiteException ex)
{
throw new Exception("Select Data failed: " + ex.Message);
}
finally
{
this.Close();
}
}