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)

225 results for: in tag: sql

.NET SqlConnection and SqlCommand

I use SqlConnection and SqlCommand classes in my project with Dapper ORM but I've got a strange problem. When I use SqlCommand for inserting a row in a db table it always work correct and when I select updated data form tables everything is fine but after...
.net dapper sql sqlcommand sqlconnection
asked by shadeglare

Map string to guid with Dapper

I'm using Dapper to hammer out some load testing tools that need to access a PostgreSQL database. This particular version of PostgreSQL does not support GUIDs natively, so GUID values are stored as 32 character strings. The values are converted to strings...
c# dapper orm sql
asked by Marnix van Valen

Does Dapper support the like operator?

Using Dapper-dot-net......The following yields no results in the data object:...var data = conn.Query(@" select top 25 Term as Label, Type, ID from SearchTerms WHERE Term like '%@T%'", new { T = (string)term }); ...Howeve...
dapper sql
asked by Jay Stevens

How do I select an aggregate object efficiently using Dapper?

Lets say that I have a series of objects that form an aggregate....public class C{ public string Details {get;set;} } public class B{ public string Details {get;set;} public List<C> Items {get;set;} } public class A{ public long ID {get;set;} p...
c# dapper sql
asked by Peter

Dapper multiselect: Nested class primary key doesn't map unless using "AS"

I have two classes:...class Foo{ public int FooId { get; set; } ... public Bar Bar { get; set } } class Bar{ public int BarId { get; set; } public int FooId { get; set } ... } ...when i then run the query like this:...sqlConnectio...
.net c# dapper sql
asked by Joakim

Inserting One to Many Entities using dapper

I have following two classes and corresponding db tables. I am trying to insert the full object graph (student with multiple courses). I am looking for an example on how would one do this using Dapper. The Id's are auto-increment identity fields....Cla...
.net dapper insert one-to-many sql
asked by Anil Ali

Parameterized LIKE clause in SQL statement using Dapper

I want to perform the following query using Dapper, which currently doesn't return expected results (I think it must be treating the @pName param as literal text within the single quotes?):...var q = "SELECT * FROM Users WHERE Name LIKE '@pName%'"; ...@pN...
dapper sql
asked by marcusstarnes

SELECT * FROM X WHERE id IN (...) with Dapper ORM

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 * FROM SomeTable WHERE id IN (commaSeparatedListOfIDs) ...Th...
.net dapper sql
asked by Marko

How to call a L2S provider to translate a predicate in form of Func<T,bool> to a SQL where clause?

I am using L2S in my application but i'm switching more and more to ...dapper.net... because i'm having major issues with query performance and the annoying ...n+1 selects... problem....Its working fine, but i miss the comfortable LINQish style of writing...
dapper linq-to-sql predicate sql sql-server-2008
asked by Jan

ORM for use with databases that have semi-flexible schema design

I like the "micro" approach of Dapper, Massive, PetaPoco etc. and I like to have control over the SQL we send to the database, most of the time it's relatively simple. I also like working with POCO's however when dealing with a somewhat flexible schema de...
c# dapper orm petapoco sql
asked by Christian Sparre

Non-parameter SQL Variables with MySql Connector/Net and Dapper?

The code below generates the following error: ...Parameter '@ID' must be defined....Am I doing something wrong or is not it possible to use variables in the SQL query with MySQL which aren't Dapper parameters? ...In this example, @Slug is a Dapper para...
dapper parameters sql
asked by Mike Gleason

Using Dapper to map more than 5 types

I am currently building a SELECT query that joins 12 tables together. I've been using Dapper for all my other queries and it works great. Problem is, the generic methods only have to five generic parameters....I've previously modified the code to support ...
c# dapper sql
asked by Christian Droulers

C# database access, Dapper, SQL and POCOs - programming design

Let's say we have a table in SQL represented in C# like this:...public class Product { public int ID { get; set; } public string Name { get; set; } public string Picture { get; set; } // filename of the picture, e.g. apple.jpg public int Categ...
asp.net dapper design-patterns oop sql
asked by walther

Dapper. Execute Query with GOs

I am trying to use Dapper to run a SQL Query:...use master go if exists (select name from sys.databases where name = N'TestDB') drop database [TestDB] go create database [TestDB] on primary ( name = 'TestDB_Data', filename = '$Path\TestDB_Data.mdf'...
dapper sql
asked by Miguel Moura

Dapper not adding parameters

I am trying to use Dapper for our complex queries to remove any lost overhead that was previously existing with NH....I have the following query (note this has been considerably shrunk):...SELECT DISTINCT * FROM tasks t WHERE t.initials = @UserInits ...
dapper informix odbc sql
asked by Stuart.Sklinar

Dapper GridReader already Disposed Error

I'm using Dapper dot net to execute a stored procedure that returns 4 result sets. Here's how I'm doing it:... public Results Search(Query query) { if (query == null) throw new ArgumentNullException("query"); Results results; ...
.net dapper sql sql-server
asked by Ronnie Overby

Dapper Multi Mapping with QueryMultiple

I have a stored procedure that returns multiple result sets. I'm executing this with dapper....One of the result sets is Person JOIN Checks, where Person can have many Checks....The end goal is to have distinct person objects that have a collection of che...
.net dapper sql
asked by Ronnie Overby

SQL Query Generator for Dapper

Hi was trying to find the ORM with the best performance to use in our new project. My final choice became Dapper. We also need to have our application to include the following features (at least) which prevent us from hard coding the SQL queries to pass t...
c# dapper orm sql
asked by Moslem Ben Dhaou

Disable dapper.rainbow from using ID while inserting

I am using dapper.rainbow for inserting a record into MSSQL db. Following is my code...int? id = db.RoomTypes.Insert(roomType) ...When i run my app, i am getting the below exception....Cannot insert explicit value for identity column in table 'RoomTypes'...
c# dapper dapper-rainbow sql
asked by krishnan

What SQL access layer to use for simple reading in Play-Scala?

I will be implementing a read-only web application in Play 2.1 (Scala). Since I'll only be doing reading and marshaling the data read to JSON I would like to avoid any other DSLs and mappings....I've done similar projects in .NET/C# using ...dapper-dot-ne...
anorm dapper playframework-2.0 scala sql
asked by jl.

Page 1 of 12
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • …
  • »
  • »»

Prime Library

Performance

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

Expression Evaluator

  • C# Eval Expression
  • SQL Eval Function
More Projects...