Commit b3dc7d18 authored by Sam's avatar Sam

Merge pull request #68 from tms/rainbow-extensibility

Updated Table methods to better support multi-DB
parents fb04a9cb 73d0ba34
......@@ -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% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment