Questions tagged [dommel]

a library with easy CRUD operations for Dapper.

Dommel consists of a set of extension methods on the IDbConnection interface which provides CRUD operations. The generated SQL queries are executed and mapped to objects by Dapper.

Dommel has support for selecting entities by id or all entities in a table and insert, update and delete queries. See the API section of the docs for more.

Some code examples:

using (var con = new SqlConnection())
{
   var product = con.Get<Product>(1);
   var products = con.GetAll<Product>();

   con.Insert(new Product { Name = "Bike", InStock = 4 });

   product.LastUpdate = DateTime.Now;
   con.Update(product);

   con.Delete(product);
}

There are also certain extensibility points available, allowing you override the process of resolving properties and the key property of an entity, table name and column names. Also see the docs.

Query builders allow you to add custom query generation functionality for certain a RDBMS.

The Dommel extension of Dapper.FluentMap makes use of the extensibility of Dommel by implementing the resolver interfaces. This allows you to fluently map your POCO entities to the underlying database.

6 questions
3
votes
0 answers

Dapper Dommel - query join automatic mapping

I'm sorry for my bad english, but here it goes, I am using Dapper with Dapper Dommel to simplify operations like crud, but in Dommel's Github says that it supports Join operations too, so I'm trying to implement it on my code, so far I managed to…
2
votes
1 answer

Create a convention for ids using dapper

I'd like to create a convention to set the column that are named as "Id" to be primary key, I've been looking at the documentacion and so far I've foud ony to do it manually class by class like: with dommel: public class ProductMap :…
pedrommuller
  • 15,741
  • 10
  • 76
  • 126
1
vote
1 answer

How to use Dapper.FluentMap.Dommel.Mapping for multiple Ids

I'm having a problem using Dapper.FluentMap.Dommel.Mapping. When I log the mapping, the system identifies that a property with the name ID already exists and throws the exception. But mapped Id belongs to another object. How can I solve this…
Felipe Augusto
  • 1,341
  • 1
  • 16
  • 18
0
votes
1 answer

How to use Dapper with Dommel and FluentMap to Insert a record into a table that doesn't have an Key?

I'm creating a service in my API that uses Dapper with Dommel and FluentMap. The database is Microsoft SQL Server. I have an endpoint that needs to insert a record into an table that hasn't a key. The table is described like in this entity…
tfidelis
  • 443
  • 8
  • 16
0
votes
1 answer

Dapper Dommel - Usinng Like-queries issue

I'm trying to use Like-queries as shown in Dommel documetation: using (var con = new SqlConnection()) { var products = con.Select(p => p.Name == "Awesome bike"); var products = con.Select(p => p.Created < new DateTime(2014,…
Giancarlo Melis
  • 697
  • 4
  • 17
0
votes
1 answer

How can I map my sorting to SQL correctly?

I have the following class: public class ReturnDto { [Column("PARC_NUM")] public int ParcelNumber { get; set; } ~[Column("CUSTOM_TAXE")] or [Column("AUTOMATIC_TAXE")]~ public decimal Taxe { get; set; } } I'm working in this Api…