I am switching a repository layer from linq to dapper. In linq, I can use the SqlMetal.exe tool to generate the database entities and relationships. Is there a tool or utility that will generate POCO entities for dapper?
Asked
Active
Viewed 3,214 times
4
-
See http://stackoverflow.com/questions/11056141/how-to-generate-model-from-database-using-dapper – D'Arcy Rittich Jan 05 '14 at 01:24
1 Answers
3
Dapper
does not have a model generator, it acts as extension on your current IDBConnection
.
You could use any other tool to generate the POCO's though. All Dapper
needs is a class matching its public properties with your db columns.

Alex
- 7,901
- 1
- 41
- 56
-
I did find the EF 4.x POCO Entity Generator for c#. Will this work? – user1790300 Apr 28 '13 at 15:28
-
As mentioned, it doesn't matter how you generate your pocos. Dapper doesn't require any attribute-tagging etc. The properties just have to match with name / data type to your db columns. – Alex Apr 28 '13 at 20:01