Third Party Library - Dapper.Rainbow
Dapper.Rainbow is a small library which contains an abstract class that you can add to your project and use as a base class for your Dapper classes to provide CRUD operations, such as inserting, deleting, updating and getting records.
Dapper.Rainbow is a wrapper for database interactions and will create SQL based on property names and type constraints.
Dapper.Rainbow is available through NuGet: https://www.nuget.org/packages/Dapper.Rainbow/
You can easily install this library by running the following command:
PM> Install-Package Dapper.Rainbow
More information and documentation can be found at: https://github.com/StackExchange/Dapper/tree/master/Dapper.Contrib
Once you installed this library, you will need to create a new class and derived from the Database
You can now use CRUD methods easily in your code.
Unfortunately, there is no proper documentation available for this library.
- There is no support for composite key mapping.
- Identity column name for all tables must be called Id.
This library is supported on a regular basis and you will get your answers within next few days. https://github.com/StackExchange/Dapper/issues