adamfoneil / Dapper.CX

A Crud library based on Dapper
MIT License
8 stars 1 forks source link

use ComponentModel.DataAnnotations [Key] attribute instead of custom [PrimaryKey] #4

Closed adamfoneil closed 4 years ago

adamfoneil commented 4 years ago

The only time this comes up is with MergeAsync -- it can inspect a model class for key properties. Although you can pass your own key properties, MergeAsync can use reflection to find [PrimaryKey] properties. As a POCO thing, it would be better I think if we used the built-in [Key] attribute -- to remove a dependency on Dapper.CX