dapper 注意事项之GUID

今天把ef框架换成了dapper,数据库使用的是mysql.

主键使用GUID,mysql数据库中设置的为varchar(36).

使用dapper报错,不能将string转换为GUID,后来调试比对发现,mysql中要使用GUID,必须设置为char(36)不能设置为varchar(36).

原文地址:https://www.cnblogs.com/wangchaozhi/p/5164033.html