Rainbow provides simple CRUD methods to your Dapper classes through the implementation of the Rainbow abstract base class.
Questions tagged [dapper-rainbow]
13 questions
79
votes
3 answers
Dapper.Rainbow VS Dapper.Contrib
Can someone please explain the difference between Dapper.Rainbow vs. Dapper.Contrib?
I mean when do you use SqlMapperExtensions.cs of Dapper.Contrib and when should you use Dapper.Rainbow?

Shuaib
- 1,561
- 3
- 19
- 28
29
votes
5 answers
Ignore property on model property
How can I ignore a property on my model using dapper/dapper extensions/dapper rainbow or any
of those dapper libraries?

Elisabeth
- 20,496
- 52
- 200
- 321
15
votes
2 answers
How to do an insert and update for an object with a navigation property using Dapper.Rainbow (or optionally using Dapper.Contrib)
I started looking into Dapper just recently. I'm testing it out and was able to do basic CRUD and what I meant by basic is that working on a class with this structure:
public class Product {
public int Id {get;set;}
public string Name…

von v.
- 16,868
- 4
- 60
- 84
6
votes
4 answers
Dapper Rainbow - How to specify table name in another schema
I am pretty new to Dapper Rainbow so I may be missing something obvious. Is it possible to specify the table name and if so how?
I have tried the following with no luck.
public class DashboardContext : Database
{
public…

Andrew
- 5,215
- 1
- 23
- 42
5
votes
1 answer
How do I get Dapper.Rainbow to insert to a table with AutoIncrement on SQLite?
I created a sample table on SQLite that has an Id column that is auto increment.
CREATE TABLE "ESVLIntegration" ("Id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL UNIQUE , "ProcessId" TEXT NOT NULL , "UserId" INTEGER NOT NULL , "Status" TEXT NOT…

Alvaro Oliveira
- 458
- 2
- 13
4
votes
1 answer
Dapper.Rainbow with existing database schema
I am trying out Dapper. I like what I have seen so far. In order to do simple CRUD, I use Dapper.rainbow. It works very well. However, it works only if the table has identity column with name Id. It makes sense to have db like that but I can not ask…

Yogiraj
- 1,952
- 17
- 29
3
votes
1 answer
C# IsNull() and IsEqualTo() - Visual Studio doesn't recognise them in sample Dapper.net / Contrib code
I'm sure I'm being really stupid here - but I'm getting into Dapper and contrib. Sample code includes lines like this:
using (var connection = new SqlConnection(ConfigurationManager.ConnectionStrings["DefaultConnection"].ConnectionString))
…

niico
- 11,206
- 23
- 78
- 161
3
votes
1 answer
Disable dapper.rainbow from using ID while inserting
I am using dapper.rainbow for inserting a record into MSSQL db. Following is my code
int? id = db.RoomTypes.Insert(roomType)
When i run my app, i am getting the below exception.
Cannot insert explicit value for identity column in table 'RoomTypes'…

krishnan
- 782
- 1
- 9
- 20
3
votes
1 answer
dapper rainbow MissingMethodException
Why do I get this exception? The code isn't the same but close to the 'demo' https://gist.github.com/1599013
Exception: MissingMethodException
Desc:
Method not found: 'System.Collections.Generic.IEnumerable1…
user34537
1
vote
0 answers
Using Dapper Rainbow with a Firebird database
I'm currently trying to use Dapper rainbow as a wrapper for my Firebird database.
The problem is that it seems to be generating SQL for a different type of DB.
The SQL generated is:
select 1 from INFORMATION_SCHEMA.TABLES where TABLE_NAME =…

Syneri
- 43
- 5
0
votes
1 answer
Dapper.Rainbow Database.Insert - removes Id from object - how to override?
I'm using Dapper and Dapper.Rainbow for my ORM (well just switching to it from EF).
My tables have Guids/uniqueidentifiers as Id's.
I'm doing an insert using Dapper Rainbow and it is removing the Id param.
See line 62 of the Insert…

Will
- 773
- 1
- 7
- 24
0
votes
1 answer
I needed to do Bulk insert with dapper rainbow
I am using the dapper rainbow database.cs extensions,
private void insertList(IEnumerable list)
{
using (SqlConnection conn = new SqlConnection(connectionString))
{
var db = myDB.Init(conn, commandTimeout:…

WingMan20-10
- 3,594
- 9
- 31
- 42
0
votes
1 answer
Inserting into Table 'User' with Dapper.Rainbow
I am using Dapper.Rainbow and have come across an issue when inserting into a table named 'User'.
I can get other tables to work perfectly, but when try to insert to the Users table it will fail.
I have used the Sql Query inspector to determine that…

Jastill
- 656
- 3
- 15