I am attempting to run a query against my database using Dapper, however, an exception is being thrown. The message of the exception is Incorrect syntax near ‘)’ The part of this that is confusing to me is that I have no right parens in my entire query. It used to have some, but I have been simplifying it until
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
InvalidOperationException: No columns were selected when performing a DELETE query
I have the feeling I’m missing something obvious, but I can’t quite put my finger on it. So when this piece of code gets executed, I get the exception: Even though I don’t need anything back from my call. I just want to know whether or not my DELETE query has succeeded. The strange part is that the query does
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