TortugaResearch / Tortuga.Chain

A fluent ORM for .NET
Other
335 stars 22 forks source link

Use Traits for ISingleRowDbCommandBuilder/IMultipleRowDbCommandBuilder #481

Closed Grauenwolf closed 2 years ago

Grauenwolf commented 2 years ago

The implantation for ISingleRowDbCommandBuilder and IMultipleRowDbCommandBuilder are exactly the same for each class that uses them. So they are good candidates for being converted into a trait.

Grauenwolf commented 2 years ago

This won't work. We can't put generics on a trait because the UseTrait attribute doesn't accept generic type arguments. For example, we can't write,

[UseTrait(typeof(MyTrait<TCommand, TParameter>))]
class MyCommandBuilder<TCommand, TParameter>