Using Dapper-dot-net, how do I map SQL uniqueidentifier column to a .Net type?

Viewed 8816

I have an existing database that uses the SQL "uniqueidentifier" type, which looks like a different GUID format than a .Net GUID.

Question: Using Dapper, how do I map SQL uniqueidentifier column to .Net?

Issue: Using Dapper-dot-net, when I map the column using the .Net GUID type, it compiles and runs, but all of the .ToString() output displays the same incorrect GUID. (well it doesn't match what I see in SSMS)

When I try to map the column using the string type, I get a compiler error.

Ideas? Is this possible?

2 Answers
Related