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...
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...
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...
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 Stored Procedure and I have search a lot on web but n...
I'm using dapper for a mvc3 project at work, and I like it. However, how are you supposed to layer the application when using dapper? Currently I just have all my sql stuffed directly in the controller (...slap...) but I was thinking of making a class wit...
Playing around with Dapper, I'm quite pleased with the results so far - intriguing!...But now, my next scenario would be to read data from two tables - a ...Student... and an ...Address... table....Student... table has a primary key of ...StudentID (INT I...
When using Dapper-dot-net, if your querying to a strongly typed results, and your SQL just has a: ...select *
...Will Dapper automappically only do a select on the columns that match the fields in your object? I think PetaPOCO does this but I ran into s...
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...
var sql = @"SELECT
a.id AS `Id`,
a.thing AS `Name`,
b.id AS `CategoryId`,
b.something AS `CategoryName`
FROM ..";
var products = connection.Query<Product, Category, Product>(sql,
(product, category) =>
{
product.Catego...
In using Dapper's Query() function, I am trying to fill in a class that has a property which is an enumerated value. In my database, this column is stored as a byte. However, in the class, they are an enum. In the old ADO.NET approach, I'd convert duri...
I have a code Structure as below:...class Person
{
Name PersonName;
int Age;
}
class Name
{
string FirstName { get; set; }
string LastName { get; set; }
}
...Here is my Stored Proc which populates the data from Database....Create Procedur...
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...
Is it possible to use anonymous types with Dapper?...I can see how you can use dynamic i.e. ...connection.Query<dynamic>(blah, blah, blah)
...is it then possible to do a ....Select(p=> new { A, B ,C })
...or some variation of that afterwards?...Edit...I...
I am pulling in a ...Dapper FastExpando... object and want to be able to reference the column names dynamically at run time rather than at design/compile time. So I want to be able to do the following:...var testdata = conn.Query("select * from Ride Wher...
I am experimenting with dapper. I have a class which has an enum and the values are stored as strings in the database....This works with FluentNHibernate using GenericEnumMapper...Is it possible to do the same with Dapper?
I've just started using Dapper for a project, having mostly used ORMs like NHibernate and EF for the past few years....Typically in our web applications we implement session per request, beginning a transaction at the start of the request and committing i...
We use Oracle as our database provider and have looked into replacing some of our data access layer (hard to maintain, harder to merge XSD's) with a saner repository based pattern using Dapper at the bottom layer. However, we have hit a number of issues w...
Below is the code I'm using to return a paged list of objects:...string query2 = @"
select count(*) as TotalCount from blogposts p where p.Deleted = 0 and p.PublishDate <= @date
select * from (
select p.*,
row_numb...