4

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?

user1790300
  • 2,143
  • 10
  • 54
  • 123

1 Answers1

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