dapper Questions
3
Solved
Im trying to convert a dynamic query from dapper to IDictionary<string, object>
const string sql = @"SELECT Name, Street FROM Contact";
dynamic query = null;
using (var cn = Connec...
2
Solved
Update:
As Marc noted below, my fundamental question is: What happens when Read() gets called more times than there are record sets when using QueryMultiple()?
I'm working on converting an exis...
10
Solved
What is the simplest way to check if record exists using the Dapper ORM?
Do I really need to define POCO objects for a query where I only want to check if a record exists?
Immoderate asked 17/8, 2016 at 21:23
5
I have a simple question about dapper with Oracle database, when I was trying to insert a large size of string into oracle clob, it throws exception says:
Specified argument was out of the range ...
5
I'm using dapper for a new project and love it but I don't understand why my queries are really slow. The execution time is very fast, almost instant, but the connection stays open much longer whil...
8
Currently, I am trying to use the Dapper ORM with the Unit Of Work + Repository Pattern.
I want to use Unit of Work as opposed to a simple Dapper repository due to the fact that my insert and updat...
Gillum asked 8/7, 2015 at 16:18
5
Solved
I'm feeding a ReportDataSource with a query using Dapper.
However, I have an empty report, even with an IEnumerable loaded data.
When you spend a Datatable works.
How do I pass data from a query u...
Busybody asked 19/7, 2013 at 20:58
4
I'm trying to use the Multi-mapping feature of dapper to return a list of Album and associated Artist and Genre.
public class Artist
{
public virtual int ArtistId { get; set; }
public virtual str...
7
Solved
I am very impressed with the results of Dapper Micro ORM for stackoverflow.com. I am considering it for my new project and but I have one concern about that some times my project requires to have S...
Fosse asked 11/5, 2011 at 9:35
2
Solved
I have a stored procedure that has a parameter with no default value, but it can be null. But I can't figure out how to pass null with Dapper. I can do it just fine in ADO.
connection.Execute("spL...
Secure asked 19/6, 2012 at 18:11
3
Solved
How can I use dapper to connect and get data from a sqlite database?
3
Solved
I have a T-SQL stored procedure:
CREATE PROCEDURE [dbo].[GetRequestTest]
@RequestId UNIQUEIDENTIFIER
AS
BEGIN
SELECT
Request.Amount,
Request.Checksum
FROM
Request
WHERE
RequestId = @R...
Shirlshirlee asked 10/7, 2015 at 6:29
2
Solved
I need to use Table Valued Parameter with string query
I have the following code
string query = "SELECT * FROM Tabla1 T1 INNER JOIN @listItems T2 ON T2.Id = T1.Id";
var results = sqlConnection.Qu...
Smoking asked 10/8, 2015 at 14:17
6
Solved
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 {ge...
2
Solved
I have a PostgreSQL function that takes in a parameter of type json. Using Dapper, how do I execute a call that passes the object to the PostgreSQL function such that PostgreSQL recognizes the type...
Gynaecomastia asked 23/5, 2019 at 22:25
6
I was trying to create a generic method, which can read the parameters name and value from a class at Runtime and create parameter collection for Dapper query execution. Realized that till the poin...
Clodhopper asked 12/10, 2015 at 18:14
4
Solved
Is there any way to use Dapper.NET with stored procs that return multiple result sets?
In my case, the first result set is a single row with a single column; if it's 0 then the call was successful...
Wisent asked 11/6, 2011 at 19:7
3
Solved
I'm trying to commit a transaction to my Sql Server 2008 database - firstly 2 insert's followed by a couple update's, however, as soon as it attempts to execute the first of the update's, I g...
Apivorous asked 31/7, 2011 at 19:46
5
Solved
I've managed to get something up and running today as small sandbox/POC project, but have seemed to bump my head on one issue...
Question:
Is there a way to get dapper to map to SQL column nam...
4
I need help for mapping enums with Dapper and Oracle.
I have a field in Oracle type NUMBER (1) and must turn into an enum in my entity.
public Status Status { get; set; }
Status is a enum:
pu...
3
I'm attempting to use Dapper to interface to an existing database format that has a table with a duration encoded as ticks in a BIGINT column. How do I tell Dapper to map my POCO's TimeSpan-typed p...
Hauptmann asked 24/11, 2014 at 16:38
17
Solved
I am new to the Dapper micro ORM. So far I am able to use it for simple ORM related stuff but I am not able to map the database column names with the class properties.
For example, I have the foll...
Jequirity asked 17/1, 2012 at 22:35
4
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 ...
11
Solved
What is the best way to write a query with IN clause using Dapper ORM when the list of values for the IN clause is coming from business logic? For example let's say I have a query:
SELECT *
FR...
8
Solved
If I have a simple query such as:
string sql = "SELECT UniqueString, ID FROM Table";
and I want to map it to a dictionary object such as:
Dictionary<string, int> myDictionary = new Dictio...
1 Next >
© 2022 - 2024 — McMap. All rights reserved.