Project Information Starred by 313 users Members Links | Dapper - a simple object mapper for .NetOfficial Github clone: https://github.com/SamSaffron/dapper-dot-net FeaturesDapper is a single file you can drop in to your project that will extend your IDbConnection interface. It provides 3 helpers: Execute a query and map the results to a strongly typed ListNote: all extension methods assume the connection is already open, they will fail if the connection is closed. public static IEnumerable<T> Query<T>(this IDbConnection cnn, string sql, object param = null, SqlTransaction transaction = null, bool buffered = true) Example usage: public class Dog Execute a query and map it to a list of dynamic objectspublic static IEnumerable<dynamic> Query (this IDbConnection cnn, string sql, object param = null, SqlTransaction transaction = null, bool buffered = true) This method will execute SQL and return a dynamic list. Example usage: var rows = connection.Query("select 1 A, 2 B union all select 3, 4"); |