Open palenshus opened 2 years ago
The implementation should be quite simple I believe, similar to how Get or GetAll are implemented. Here's the extension method I've been using:
public static int Count<T>(this IDbConnection connection) { return connection.QuerySingle<int>($"SELECT COUNT(1) FROM {typeof(T).Name}"); }
Obviously the real implementation would need to incorporate the TableAttribute
The implementation should be quite simple I believe, similar to how Get or GetAll are implemented. Here's the extension method I've been using:
Obviously the real implementation would need to incorporate the TableAttribute