Skip to content
Advertisement

Tag: dapper

Only returning one record in dataset

I am using ado .net in my web API and dapper and I have a function that checks the orders and the order lines it works fine if their only one order but if there an order without order lines it won’t …

Dapper query with dynamic list of filters

I have a c# mvc app using Dapper. There is a list table page which has several optional filters (as well as paging). A user can select (or not) any of several (about 8 right now but could grow) filters, each with a drop down for a from value and to value. So, for example, a user could select category

Insert a list using dapper.NET C#

I’d like to insert a list of objects in an SQL table. I know this question here but I don’t understand. Here is my class : I’d like to know how could I insert my list using Dapper, I don’t want to iterate on the list and save them one by one, I would like to insert all of them

Generic repository with Dapper

I’m trying to build a generic repository with Dapper. However, I have some difficulties to implement the CRUD-operations. Here is some code from the repository: As you can see, my delete-method takes a TEntity as parameter which is a parameter of type class. I call my Delete-method from my UserRepository like this: The thing is that I can’t write entity.Id

Advertisement