提交 b3dc7d18 编写于 作者: S Sam

Merge pull request #68 from tms/rainbow-extensibility

Updated Table methods to better support multi-DB
......@@ -90,7 +90,7 @@ public int Update(TId id, dynamic data)
/// <returns></returns>
public bool Delete(TId id)
{
return database.Execute("delete " + TableName + " where Id = @id", new { id }) > 0;
return database.Execute("delete from " + TableName + " where Id = @id", new { id }) > 0;
}
/// <summary>
......@@ -103,7 +103,7 @@ public T Get(TId id)
return database.Query<T>("select * from " + TableName + " where Id = @id", new { id }).FirstOrDefault();
}
public T First()
public virtual T First()
{
return database.Query<T>("select top 1 * from " + TableName).FirstOrDefault();
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册