Schotime @ February 13, 2012
.NET
|
Comments (1)
After using the Fluent Mapping’s I blogged about a few months ago, I started to see patterns occurring. My table names were always the pluralized type and the primary key was the Type name concatenated with “Id”. With all this repetition, I decided that conventional mappings were needed and that they should be overridable for [...]
Schotime @ November 20, 2011
.NET
|
Comments (1)
The other day I got enough time to put the ability to fetch multiple result sets into PetaPoco. Its relatively simple to use and works like this. Given these two classes with corresponding tables: public class Table1 { public string Name { get; set; } } public class Table2 { public string Col1 { get; [...]
Schotime @ August 21, 2011
.NET
|
Comments (2)
PetaPoco is a great way to map results from a database. Usually these are flat objects, however sometimes its useful to map many-to-one/one-to-many relationship directly into a viewmodel or complex object. This feature has been possible in PetaPoco since version 4 as shown in the blog post by Brad, (http://www.toptensoftware.com/Articles/115/PetaPoco-Mapping-One-to-Many-and-Many-to-One-Relationships) however, custom mapping needed to [...]
Schotime @ May 31, 2011
.NET
|
Comments (5)
A couple of weeks ago I showed how we can use the awesome Glimpse project with PetaPoco to show all the SQL’s processed in the current request. The problem was there was a few things that needed to make it into both PetaPoco and Glimpse to support this. The PetaPoco changes were in place as [...]
Schotime @ May 16, 2011
.NET
|
Comments (6)
Update 20/Nov/2011: This has been now added to my master branch and is available here for download as of 4.0.3.5. https://github.com/schotime/PetaPoco/downloads The other day I set out to build another way to configure the mappings for PetaPoco. Here is how you currently configure a mapping using attributes. [TableName("AttribPocos")] [PrimaryKey("Id")] public class attribpoco { public int [...]
Schotime @ May 9, 2011
.NET
|
Comments (1)
Last week I blogged about upcoming performance statistics that enable you to see all the Sql’s that were executed by PetaPoco in the current request. It was also just over a week ago that I learned about Glimpse from this Mix video by Scott Hanselman. And wow what an impact. Anthony van der Hoorn (@anthony_vdh) [...]
Schotime @ May 4, 2011
.NET
|
Comments (8)
As I mentioned a few posts ago, in the last couple of years I moved away from writing native SQL to a full blown ORM and back again. Well not all the way back. Here is where PetaPoco comes in. I had been using my own SQL to Object mapper for a while before I [...]
Schotime @ May 3, 2011
.NET
|
Comments (1)
The other day Sam from stackoverflow blogged about a slow page caused by a combination of problems resulting in them using Dapper to map native SQL to the objects resulting in a nice performance improvement. I liked how he made the queries executed for the current request display in html comments in the html source, [...]