Dapper.Rainbow VS Dapper.Contrib

后端 未结 3 1643
时光说笑
时光说笑 2020-11-30 18:55

Can someone please explain the difference between Dapper.Rainbow vs. Dapper.Contrib?

I mean when do you use SqlMapperExtensions.cs

3条回答
  •  醉酒成梦
    2020-11-30 19:50

    This post by Adam Anderson describes the differences between several CRUD Dapper extension libraries:

    • Dapper Contrib (Automatic change tracking - only if dirty or not, Attributes for custom mapping, No composite key support, No manual key support)
    • Dapper Rainbow (Manual change tracking using Snapshotter, Attributes for custom mapping, No composite key support, No manual key support)
    • Dapper Extensions (No change tracking, Fluent config for custom mapping, Supports composite keys, Supports manual key specification), also includes a predicate system for simple queries (NOTE: deprecated - does not support recent Dapper versions nor .NET core)
    • Dapper SimpleCRUD (No change tracking, Attributes for custom mapping, No composite key support, Supports manual key specification), also includes filtering/paging helpers, async support, automatic POCO class generation (through T4)

提交回复
热议问题