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.
33 questions
2
votes
0
answers
73
views
Generic UnitOfWork implementation with Dapper. (Updated)
Here's my attempt to implement the suggested corrections I received in my previous post. Since System.Data.IDbTransaction doesn't support ...
2
votes
3
answers
272
views
Is this method for loading data in a C# application recommended?
Goal
I'd like to understand if this current method, of loading data and inserting data into a database I currently use is to be avoided?
Code
I drafted a simple application that loads data and inserts ...
2
votes
2
answers
227
views
Dapper with shops and payers
I live in the buildings that have 50 people in it and for each floor splits into 2 groups each group is from ~9 people. I'm trying to build an Xamarin app (IOS, ANDROID ,Win10,maybe web app) to make ...
0
votes
1
answer
442
views
Is this correct way to setup DB Infrastructure with repository pattern and Dapper
So, I am using Repository pattern with Dapper and ADO.NET. I have my based DB infrastructure setup as follows:
...
2
votes
1
answer
151
views
Reducing Inventory Quantity When Order Is Being Processed
I've got a method which removes quantity from inventory when an order is completed. If there is not enough inventory quantity available, the order completion fails and the sql transaction is rolled ...
5
votes
2
answers
3k
views
Repository pattern with Unit of work using ADO.NET in C# to authenticate user from database
So I am using the latest version of Dapper and it works great for mapping my POCO classes but there are some scenarios where I need to return a DataSet instead of ...
4
votes
1
answer
238
views
Is my structure of program readable?
Just looking for reviews to improve my coding and my structure of C#. It feels I probably have some unnecessary code that is not needed, been following some YouTube videos to accomplish some tasks.
...
3
votes
1
answer
943
views
CRUD integration test, is it ok?
I want to test my CRUD operation to a MySql database (I use dapper as my ORM).
This is what I wrote with ...
0
votes
1
answer
116
views
Getting names/values of multiple properties [closed]
Lets say I have one method, which extracts property name and value:
...
4
votes
1
answer
5k
views
Dapper "async" and "await using"
I have been building my data access layer and performance is key for the project I am working on.
I have chosen to use Dapper and dotnet core 3. I want to make use of the latest and greatest async ...
0
votes
1
answer
1k
views
Is there a better approach to implementing Dapper with Mediatr?
I'm playing around with using Dapper with Mediatr in a .NET Core API. It's all working nicely.
Its a learning project for me so I am just putting together a system that will hold user details ...
2
votes
0
answers
400
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
1
answer
3k
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
0
answers
3k
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 ...
2
votes
1
answer
3k
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 ...