Simple C# Code Generator to create Database Models and Dapper CRUD to reduce manual code entry and repetitive work.
- Clone or download the repository
- Open the solution file (DapperCodeGenerator.sln) in Visual Studio 2017
- Make sure the Web project is set as the startup project
- Start/run with IIS
- I run it with IIS Express from Visual Studio 2017, you can run it however you want
- Navigate to the site
- Select the Connection Type
- If you want further support for an existing or any other DB types feel free to make a PR and/or submit a ticket, just know I won't prioritize it
- Enter a valid Connection String for the selected Connection Type
- Press the "Connect" button
- If you get messages about there not being any databases, confirm your Connection Type and Connection String
- Select any database you wish to generate code for
- A table should be populated with a list of tables for the database you selected, click the "Data Model" or "Dapper" buttons to the right to generate code
- If there are tables and it says there aren't try refreshing (state is preserved, but the tables should then populate)
This is to generate C# objects that directly reflect the database tables for use with Dapper (or anything really).
This is to generate the Dapper CRUD (Create, Retrieve/Get, Update, and Delete) methods for interacting with the Database using the data models generated in this tool and Dapper - a simple, lightweight and powerfull ORM (Object Relational Mapper). See more at https://github.com/StackExchange/Dapper.
You can also try the below alternatives...
- https://github.com/MoonStorm/Dapper.FastCRUD
- https://github.com/ericdc1/Dapper.SimpleCRUD
- Code Snippets (gists) - https://gist.github.com/kcrossman