Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [dapper]

dapper is the micro-ORM for .NET developed and used by the stackoverflow team, focusing on raw performance as the primary aim.

2
votes
0answers
58 views

A custom session with transaction support using Dapper

I wanted to write a custom session to act as proxy for a Dapper connection that could support transactions without having to expose any other DB related entities. At first, I thought of opening a ...
0
votes
1answer
113 views

Asynchronously fetching data from the database

The following C# code is written to fetch the Categories data from SQL Server Database using Asynchronous Task for HttpGet. The Dapper library is used as ORM. I ...
3
votes
0answers
1k views

Structure and Implementation of Generic Repository and Unit of Work patterns with Dapper and SqlTransactions

I am attempting to update some legacy code that I work with, but my knowledge of data access is limited to a basic use of Entity Framework and simple Dapper. After some research, I have a loose ...
1
vote
1answer
628 views

Navigation properties with sql/dapper

I want to have the same experiance with slq/dapper for my navigation properties just like in Entity Framework. But I'm not sure which sql query i should use. As you see, every single Resource entity ...
1
vote
0answers
242 views

Simple AuditLog

I am using ADO.NET in my project and I want to have a simple AuditLog. I have below Codes for that but I wounder to know is ...
1
vote
0answers
92 views

Add or modify bunch of data into database

I got my code works fine, but I am not really sure whether the approach that I took is a best practice or not. So, I decided to ask in this forum instead. So here is my situation: I got my model ...
3
votes
2answers
881 views
2
votes
1answer
1k views

Custom C# Dapper ORM wrapper

I am I C#.NET developer for a few years now... Last couple of months I have started to study design patterns and enterprise software architecture principles so that I will be able to use those ...
13
votes
2answers
6k views

Mapper made specifically to work with Dapper

I needed a mapper for a project I have using Dapper. I tried Automapper and other tools that comes with Dapper (Contrib, Rainbow, etc.), but I couldn't make Automapper work properly and the rest doesn'...
1
vote
1answer
6k views
4
votes
1answer
1k views

Updating complex objects

I'm mainly looking at usage of Dapper, but in general, any comments relating SQL -> C# object mapping best practices would be appreciated. I've got two super simple objects I'm working with: ...
2
votes
0answers
468 views

Deriving classes to decorate auto-generated base class code with attributes

Background: I am currently in the process of abstracting and refactoring out EF for Dapper with ...
1
vote
0answers
804 views

Interface for Dapper repository

I'm creating a little proposal for the data access layer using Dapper ORM. The code is based in an generic interface IStore: ...
4
votes
1answer
621 views

Micro ORM on the lines of dapper

Designing a micro ORM inspired by Dapper. I'm building this as an exercise to learn. I would appreciate if you guys can review my code. I would also appreciate any suggestions regarding the features ...
2
votes
2answers
6k views

Repository Pattern with Dapper + Unity

I just finished the Pluralsight courses about Inversion of Control and Mirco-ORMs, and I am struggling with the implementation aspect of some of the concepts. This is my (simplified) repository ...
5
votes
2answers
11k views

List<dynamic> to ComboBox

This code get a list<dynamic> from a repository class using Dapper. I need to bind this list to a ...
1
vote
2answers
550 views

Manage connection string

I'm using dapper-dot-net for data access in my ASP.NET MVC application. So in order to supply a connection string I've came up ...
3
votes
2answers
6k views

Multiple connection string in Web API 2

I have a Web API 2 using Dapper.net, and it's accessed by various client with their own database. Currently, I'm using custom header called Client-Id to identify ...
2
votes
1answer
2k views

Integration tests for a repository with the help of AutoFixture

I find it hard to do integration tests for a repository and very time consuming. Things I think about when creating integration tests for a repository: Should I skip them? Should I create an in ...
1
vote
0answers
834 views

Repository pattern with data access objects

I started a new ASP.NET project in an effort to better learn SQL and Dapper ORM framework. My idea for data access: Have POCO entities, for each entity have DAO object. When I want to manipulate with ...
2
votes
1answer
2k views

Querying a database with Dapper

In the current project that I am working on, we are using dapper to query the database and sometime when mapping from dynamic types to concrete types we end up with a messy block of code. I created a ...
6
votes
1answer
3k views

Dapper helper service

I've written a very light wrapper around Dapper to help with unit testing and streamlining the Dapper commands I need. Execute() is a method created to remove the ...
13
votes
5answers
13k views

Is this Repository Design Pattern Valid and efficient?

I am using Dapper ORM in my Data access Layer, but I think analysis of the code below doesn't depend upon any specific ORM. What should be the single common place throughout the entire Data Access ...
3
votes
1answer
4k views

Using dapper.net and repository pattern in Azure websites

I'm currently on Azure Websites & Azure SQL, some documentation recommends using Async as much as possible as cloud services higher latency and have chances of dropping traffic, but it's also ...
9
votes
2answers
2k views

Compare Oracle Table with SQL Server Table and Update/Insert

Below is the current code which is used to update/insert records from Oracle view to SQL Server table using Dapper. There is not a field to check last record updated date in the oracle view so I have ...