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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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 ...
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...
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'...
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
...
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;
...
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...
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...
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'...
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...