Dapper sqlmapperextensions automatically adds “s” to tablename?

后端 未结 2 2036
时光取名叫无心
时光取名叫无心 2021-01-04 10:53

This is my first experience with Dapper.Contrib (latest version from Nuget) and it\'s a strange situation:

using (SqlConnection cn = new Sql         


        
2条回答
  •  我在风中等你
    2021-01-04 11:19

    It is desgined this way. You can override the default behavior by decorating your POCO classes with Dapper.Contrib.Extensions.TableAttribute.

    using Dapper.Contrib.Extensions;
    
    [Table("Product")]
    public class Product
    {
    ...
    }
    

提交回复
热议问题