dapper-fastcrud

Is there a way to map properties to column names using some .Insert extension method for Dapper?

邮差的信 提交于 2020-04-17 08:42:24
问题 I have the following challenge with this class: Public Class MyClass Property Id As Integer Property LastName as String End Class The corresponding data table in the database has as fields: Id (int, not null) Last-Name (nvarchar(80),null) So I need to map MyClass.LastName to MyClasses.Last-Name and have a hell of a time... When I write a custom Insert query it all works, but I would like to use the .Insert statement of one of the Dapper extensions packages. I tried Dapper.Contrib, but this

Is there a way to map properties to column names using some .Insert extension method for Dapper?

馋奶兔 提交于 2020-04-17 08:39:06
问题 I have the following challenge with this class: Public Class MyClass Property Id As Integer Property LastName as String End Class The corresponding data table in the database has as fields: Id (int, not null) Last-Name (nvarchar(80),null) So I need to map MyClass.LastName to MyClasses.Last-Name and have a hell of a time... When I write a custom Insert query it all works, but I would like to use the .Insert statement of one of the Dapper extensions packages. I tried Dapper.Contrib, but this