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

How to use Dapper for paging and sorting?

I am giving the Dapper ORM a try. I am able to query data from a table using the code below: ...Dim comments As List(Of Comment) Using conn = New SqlConnection(ConnectionString) conn.Open() comments = conn.Query(Of Comment)("SELECT * from comme...
dapper orm vb.net
asked by ericdc

How to execute inserting and updating using Dapper?

I am interested in using Dapper - but from what I can tell it only supports Query and Execute. I do not see that Dapper includes a way of Inserting and Updating objects....Given that our project (most projects?) need to do inserts and updates, what is th...
c# dapper orm
asked by Slaggg

What Micro ORM are equivalent from Java?

What would be the closest equivalent in Java to a Micro ORM such as ...Dapper..., ...PetaPoco..., ...Massive... or ...CodingHorror...?
dapper java massive petapoco subsonic
asked by Kynth

How can I use Dapper to map lists of nested objects?

I'm currently using Entity Framework for my db access but want to have a look at Dapper. I have classes like this:...public class Course{ public string Title{get;set;} public IList<Location> Locations {get;set;} ... } public class Location{ p...
dapper orm
asked by b3n

How can I use Dapper to insert and retrieve the identity value?

How do I perform an insert to database and return inserted identity with Dapper?...I've tried something like this:...string sql = "DECLARE @ID int; " + "INSERT INTO [MyTable] ([Stuff]) VALUES (@Stuff); " + "SELECT @ID = SCOPE_IDE...
c# dapper sql-server
asked by ppiotrowicz

How to set the CommandTimeout value in Dapper?

I'm trying to run SQL backups through a stored procedure through Dapper (the rest of my app uses Dapper so I'd prefer to keep this portion running through it as well). It works just fine until the CommandTimeout kicks in....using (var c = SqlConnection(co...
.net c# dapper timeout
asked by sh-beta

How to map column names to class properties in Dapper?

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 following database table:...Table Name: Person person_id int...
dapper
asked by user1154985

How can I use Dapper and manage the database connections?

I've been playing with Dapper, but I'm not sure of the best way to handle the database connection. ...Most examples show the connection object being created in the example class, or even in each method. But it feels wrong to me to reference a connection...
.net c# dapper
asked by Donald Hughes

How with Dapper I can get values for child objects?

I am retrieving profile details with the following:...var profiles = connection.Query<Models.PROFILE>( "SELECT * FROM PROFILES WHERE ID=@ID", new { ID = profileID }); // IEnumerable var profile = profiles.First<Models.PROFILE>(); ...The profile o...
c#-4.0 dapper orm
asked by ElHaix

How to use Dapper to connect to MySql?

I am new to .NET. I am interested in using the Dapper micro-ORM to access a MySQL backend from an ASP .NET application. ...Can this be done? What do I need to know to get started?
asp.net c# dapper mysql
asked by Learner

How to use Dapper with nested objects?

I have a customer who has dictated that I use Dapper ORM, which I've never used before. I have a problem with nested objects. I have a main class (Location) which has an embedded value object class (Address). The two classes look like this:...class Locati...
c# dapper orm
asked by RWBear

Why with parameters, the stored procedure executesql is slow in Dapper?

I'm using dapper-dot-net as an ORM and it produces the following, slow-executing (1700ms), SQL code. ...exec sp_executesql N'SELECT TOP 5 SensorValue FROM "Values" WHERE DeviceId IN (@id1,@id2) AND SensorId = @sensor AND SensorValue != -32768 AND SensorVa...
dapper sql-server
asked by m__

How to use Dapper SqlMapper GridReader with a sql resultset?

*...i have a class with classA which has a list of classB as property...*...public class ClassA { public string prop1; public string prop2; public list<ClassB> Prop3; } ...and have another class ClassB...public class ClassB { public string prop4; public s...
dapper sql-server-2008
asked by subash

Do Dapper is safe from SQL Injections?

How does Dapper help protect against SQL injections? I am testing out different DAL technologies and have to choose one to be secure our site. I'm leaning towards Dapper (http://code.google.com/p/dapper-dot-net/), but need some help learning about securit...
.net .net-3.5 dapper orm
asked by cdub

How to create a table by using an object type in Dapper?

I'm trying to figure out how I can create an empty table from an object type. The type is quite simple (only primitive type properties); there's something ready to use?...Do I need to make to write my own "CREATE TABLE" query using some properties reflect...
c# dapper
asked by Ferdinando Santacroce

How to use Dapper to put a C# List into a database

Using ...dapper..., how can I insert a ...C# List... to database. Previously without ...dapper... I used the below code to ...insert the List values to database.......try { connection.Open(); for (int i = 0; i < processList.Count...
c# dapper sql-server
asked by Praveen

If I using Dapper multi-mapping method, why do I need to specify the splitOn parameter if I set a key other than Id?

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 string Name { get; set; } } public class Genre { publi...
c# dapper
asked by user2497013

How to use Dapper and return a dictionary from the query?

my sql is :...select (select count(*) from TblRMember where sex=1) male, (select count(*) from TblRMember where sex=2) female, (select count(*) from TblRMember where sex=0) unkown ...I want Dapper.Net to return a Dictinary like this:...Keys:male,female,...
c# dapper
asked by zt9788

How to return a DataTable with Dapper?

I have a scenario where I need to return a ...DataTable... from a query using Dapper. How do I return a ...DataTable... from a query using Dapper?...DataTable dt = connection.Query("SELECT * FROM table");
c# dapper
asked by user2421145

How to execute in Dapper a stored procedure with user-defined table type (UDT) parameter?

I have a stored procedure ...InsertCars... which accepts list of user defined table type ...CarType.......CREATE TYPE dbo.CarType AS TABLE ( CARID int null, CARNAME varchar(800) not null, ); CREATE PROCEDURE dbo.InsertCars @Cars AS CarType RE...
c# dapper sql-server stored-procedures
asked by imodin

Page 1 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!