zzz projects Dapper Tutorial
Getting Started Documentation 3rd Party Libraries Knowledge Base Online Examples
  • Getting Started
  • Documentation
  • 3rd Party Libraries
  • Knowledge Base
  • Online Examples
  •   Download  

Dapper Tutorial - Knowledge Base (KB)

100 results

Using Visual Studio and Dapper, how do I use a connection string?

I am trying to get a Connection String set up in my .Net Core application but i keep getting the error:...System.NullReferenceException: 'Object reference not set to an instance of an object.'...I have tried adding the following to ...appsettings.json...:...
.net-core asp.net asp.net-mvc c# dapper
asked by JoeG

After execute a Dapper query, how to I map a master/detail entity?

At work, we're considering using ...Dapper.... In the existing code base, our master/detail objects are loaded separately. Typically, this means that there is one sql statement executed for all master records and one sql statement executed per detail reco...
dapper data-modeling
asked by Mitkins

In a single query result using Dapper, how do I get the DapperRow?

I've done the following SQL query:...SELECT SUM(SI.UnitaryValue) as Amount FROM Services as S INNER JOIN ServicesItems as SI ON S.ServiceId = SI.ServiceId WHERE S.ServiceId = @ID" ...In the query: Services has a collection of Service Items. Then...
asp.net-mvc c# dapper
asked by Paulo Maurício

How in Dapper I pass argument to a select query in an Oracle database?

I'm trying to pass parameters to Dapper for a select query in an Oracle database, but somehow, it doesn't work with the ":" identifier....It works fine using string concatenation :...string req = "SELECT * FROM contact WHERE code_comite = '"; req ...
asp.net dapper model-view-controller oracle select
asked by user7191279

How to return a list of string from a Dapper query?

Is there any way to get a simple list of strings from a Dapper Query? I don't want to create an object that contains all my field names by type. My query returns one row of data. Sometimes with 2 columns other times with 5 or 20 or 100 and I just want all...
c# dapper list
asked by Ed R.

Is there some Dapper extension that allow to bind properties to database column name?

I have the following challenge with this class:...Public Class MyClass Property Id As Integer Property LastName as String End Class ...The corresponding data table in the database has as fields: ...Id (int, not null)...Last-Name (nvarchar(80),nul...
dapper dapper-contrib dapper-fastcrud
asked by Dabblernl

When I execute my sp GetAllUsers in Dapper, why do I get a sequence contains no matching element error?

Hello my question is I have 2 table one is User table the other one is CustomerUsers I select them by Deleted=0 When I try to list all users and have customerId, I am having issue that sequence contains no matching element error... My Code is below any he...
.net c# dapper entity-framework model-view-controller
asked by phantasmagoria1985

Why I get a connection timeout error when using async / await with Dapper?

We're running into an issue were we execute a large number of queries at once (large being 100-200) using Dapper async and end up getting timeout exceptions. I think what is happening is that Dapper is doing ...await ... [connection].OpenAsync(...)... (..
c# connection-timeout dapper sql
asked by Letseatlunch

Using a stored procedure, how with Dapper can I insert many rows into two tables?

I am using Dapper (...https://github.com/StackExchange/Dapper...) in asp.net core myweb api project. I have a requirement to create a master record and insert a set of rows into a child table....Ex. OrdersMaster table create an order id in this table ...
.net asp.net-core-webapi c# dapper
asked by blue

Is it possible to insert many rows in a single query using Dapper?

Does ...StackExchange.Dapper... support the following SQL syntax?...INSERT INTO MyTable (a, b, c) VALUES (1, 2, 3), (4, 5, 6), (7, 8, 9); ...I've seen some examples where you can pass in a List to be inserted but the descriptions I've seen suggest i...
dapper mariadb mysql
asked by Joe Phillips

How with Dapper to get data from a INNER JOIN sql?

I am working on DB operations on one project and developing WinForms App C# and I am using Dapper to get data out of DB, I am stuck at situation where I need to retrieve data using inner join. Eg. I've two tables Authors and Book as Follow : ...public cla...
c# dapper micro-orm orm
asked by Infii

How can I use the Dapper with a list to create an IN statement for the WHERE clause?

I'm passing an int list to Dapper Where IN clause. I get error because it is and comma-separated string....JObject step1Form = JObject.Parse(Request.Cookies["step1"]); IList<int> step1List = step1Form.Root.Select(c => (int)c).ToList(); // "1, 22, 31, 45,...
c# dapper
asked by dsub camfx

Why do I get a "'The reader has been disposed' error" error when using Dapper multiple query?

I have written stored procedure which return two result sets. and I have called stord procedure from C# code by dapper API...like this ...var Count= result.Read<int>().ToList().FirstOrDefault(); var Employees= result.Read<EmployeeData>().ToList(); ...the ...
c# dapper sql
asked by Rajiv

How to use a dynamic list to filter a query in Dapper?

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 valu...
c# dapper sql
asked by nurdyguy

How to use Dapper to insert data into a PostgreSQL jsonb column?

I'm trying to insert JSON data into a JSONB PostgreSQL column using Dapper.Net....The ...NPGSQL Documentation for JSONB... gives specific instructions to use the ...NpgsqlDbType.Jsonb... datatype....With Dapper, I'm trying to add this as a custom paramete...
c# dapper npgsql postgresql
asked by Damien Sawyer

How to get output from a stored procedure when using Dapper?

I just started learning Dapper in C# but I am having difficulty in executing stored procedures with two or more SQL Statements in one transaction....How do you get the output parameter of a Stored Procedure that contains both Insert and Select statement...
c# dapper sql sql-server
asked by thecodeexplorer

How to return dynamic values in C# Dapper?

I have a query where I am returning dynamic data and am unable to retrieve the values through Dapper as listed in their documentation (...https://github.com/StackExchange/Dapper...)....They have a sample of code like so,...var rows = connection.Query("sel...
dapper
asked by Zac

In Dapper, how to get the SQL Exception number when an error occurs?

My stored procedure is throwing custom errors to handle validation within a multi user web app. This is working as expected in SQL Server with error number 50001 being returned however when my C# code catches the error it always has the error number 50000...
c# dapper sql-server
asked by OjM

How with Dapper to insert in a temproary table?

I am trying to insert a List of integers into a temporary table using Dapper. I wrote my query based on the selected answer to this Stack Overflow ...question.... However, I get a syntax error when running the query....Code:...List<int> lst = new List<int...
.net c# dapper mysql sql
asked by Drob337

What is the best way to convert DapperRow to Dictionary<string,string> in Dapper?

I've a method that returns IEnumerable with Dapper Row. ...But I'm trying to access the data without typecasting it to a particular class and I'm getting null value.
.net .net-core c# dapper
asked by ThejaSingireddy

Page 4 of 5
  • «
  • 1
  • 2
  • 3
  • 4
  • 5
  • »

Prime Library

Performance

  • Entity Framework Extensions
  • Entity Framework Classic
  • Bulk Operations
  • Dapper Plus

Expression Evaluator

  • C# Eval Expression
  • SQL Eval Function
More Projects...
Get monthly updates by subscribing to our newsletter!
SUBSCRIBE!