2

I'm pretty new to Dapper and Dapper.SimpleCRUD (https://github.com/ericdc1/Dapper.SimpleCRUD) so please excuse if I'm being a bit dense. I have an existing database that uses GUID Ids (primary keys) rather than auto incremented int Ids. It seems that Dapper/SimpleCRUD assumes the latter. I guess I may be able to find an alternative (dapper extensions maybe?) but I was wondering if anyone had come across this and adapted it/found some other solution. Dapper Extensions (https://github.com/tmsmith/Dapper-Extensions) also appears to be based on int Ids. Your advice appreciated.

Mark Chidlow
  • 1,432
  • 2
  • 24
  • 43
  • I seem to recall a pending pull-request for guids in dapper-rainbow - I haven't tested it, though – Marc Gravell May 10 '14 at 22:37
  • Thanks Marc. I've just found https://github.com/tmsmith/Dapper-Extensions/wiki/KeyTypes which I will investigate further but looks promising - I will report back tomorrow :-) – Mark Chidlow May 10 '14 at 22:46

1 Answers1

5

This a clearly a late reply but Dapper.SimpleCRUD now has support for GUID primary keys.

https://www.nuget.org/packages/Dapper.SimpleCRUD

ericdc
  • 11,217
  • 4
  • 26
  • 34
  • 1
    Everytime I try to insert anything with a GUID as a primary key/Id, I get an IConvertible error message. Can you show some code on how you do it? – Kevin B Burns Mar 08 '17 at 19:43