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)

15 results in tag: sql

In Dapper, how to execute a stored procedure without parameter?

I'm using ...Dapper... (thanks ...Sam..., great project.) a micro ORM with a DAL and by some reason I'm not able to execute stored procedures with input parameters. ...In a example service I've the following code: ...public void GetSomething(int something...
c# dapper data-access-layer sql stored-procedures
asked by antao

Why with Dapper I get a declare the scalar variable error?

I am experiencing issues when trying to used a paramaterized query in Dapper. I have found a number of other users with similar issues but have not been able to resolve the issue....The code... public User GetUser(int employeeId) { var args...
c# dapper parameterized-query sql
asked by davidk

How with Dapper to automatically map output parameters?

I've been using Dapper to call stored procedures passing it an object. For example:...If I have an object:...public int ID { get; set; } public int Year { get; set; } ...I can create this object and pass it to my ...Execute... call as the parameters. ...
dapper sql
asked by Alex

How to use QueryMultiple method to allows you to get a result and a count at the same time in Dapper?

I wrote two segments of SQL command and want to process in one query like this:...SELECT COUNT(*) FROM books SELECT * FROM books ORDER BY bookID OFFSET 1000 ROWS FETCH NEXT 10 ROWS ONLY ...How can I use ...conn.QueryMultiple... method to get ...count... ...
.net c# dapper sql sql-server
asked by ineztia

When passing in a model, how can I create a dynamic where clause using Dapper?

I have an example model that looks like this:...public class PersonModel { public int Id {get; set;} public string FirstName {get; set;} public string Lastname {get; set;} public string City {get; set;} } ...In my repository I want to ...
.net c# dapper sql
asked by Eldorian

How to return a list of data to Dapper by executing a stored procedure?

I am trying to return data using Dapper via stored proc...My DTO Class is similar to below (removed some properties for brevity)...public class CarDTO { public int CarID { get; set; } public string Manufacturer { get; set; } public List<CarOpt...
.net c# dapper sql sql-server
asked by Ctrl_Alt_Defeat

How to create a multiple join query in Dapper?

I want to map complex object to dapper result from query which has two inner joins. I know we've solution to map one inner join but I want to map two inner joins result....Here is the Scenario:...My Classes are:...public class Order { public int id {...
c# dapper mapping orm sql
asked by Saadi

How to use Dapper to insert a list?

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 :...public class MyObject { public int? ID { get; set; } public string ObjectType { get; set; } public string C...
c# dapper list sql
asked by Vincent Ducroquet

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

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 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 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

Why I get an error in Dapper with column string parsing?

I have the following table...create table tblWorkers ( Id int identity, WorkerId nvarchar(8), Username NVARCHAR(50) not null, Password NVARCHAR(12) not null, Token NVARCHAR(max) null, CONSTRAINT PK_WorkerId PRIMARY KEY (WorkerId) ...
.net c# dapper sql sql-server
asked by Techie

How can I use a DataTable as a stored procedure parameter in Dapper?

In C#, I use Dapper to interact with SQL Server. I call a stored procedure that accepts 2 user-defined tables as parameters....And I am passing a ...DataTable... to my stored procedure. According to this ...page..., the syntax to pass a ...DataTable... is...
c# dapper sql sql-server
asked by thecodeexplorer

Page 1 of 1
  • 1

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!