Hamster
Resident Rodent
- Joined
- Aug 22, 2006
- Messages
- 42,920
Is Dapper only for ASP.NET?
Also if someone could suggest me a resource to get started else I am just going to smash codeproject and see what I can find.
eg. https://www.codeproject.com/articles/212274/a-look-at-dapper-net
Just for .NET unless there was a port (developed by StackOverflow). http://www.infoworld.com/article/3025784/application-development/how-to-work-with-dapper-in-c.html <- seems to be allright.
Dapper basically adds two extension methods on your IDbConnection object (ok, it does whole lot more but bare with me). You carry on exactly as you were by opening SqlConnections and commands, but to execute or query you'll use conn.Query<T> or conn.Execute<T>. Added benefit, it autmatically maps the results to your class if the property names match the column names (there are overrides available).
Not difficult.