Paymentsense / Dapper.SimpleLoad

Dapper.SimpleLoad
MIT License
13 stars 4 forks source link

Make [ForeignKeyReference] more flexible #13

Open bartread opened 8 years ago

bartread commented 8 years ago

At the moment [ForeignKeyReference] only works if you specify a type, and only matches on that exact type.

This can be frustrating because it means you may not be able to use a DAO in a different context and, instead, have to define a new one.

It would be better if [ForeignKeyReference] could also match on table name; i.e., you supply the name of the table or, if you've specified a type, it will match any type marked with a [Table] attribute for the same table.

(I guess this behaviour could be configurable.)