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
Perhaps the simplest way to do this (without waiting on dapper) is to have a second property:
public Guid Foo {get;set;}
public string FooString {
get { return Foo.ToString("N"); }
set { Foo = new Guid(value); }
}
And in your query, alias the column as FooString
.
Of course, then this prompts the question: should dapper support private properties for this type of thing? To which I say: probably.