Closed DeagleGross closed 7 months ago
looking good; fixed some minor nits:
/en-us/
in docs links; if you cut it, it will use the user's locale settingsan open question on the new attribute, but: looking good!
looking good; fixed some minor nits:
- avoid
/en-us/
in docs links; if you cut it, it will use the user's locale settings- formatting in docs
- used a different variant of that string equality fix
an open question on the new attribute, but: looking good!
Thanks for the useful advices and fixes, Marc! Sorry for attribute usage - I added it. Ready for review
Goal:
Support
[System.ComponentModel.DataAnnotations.Schema.ColumnAttribute]
as an additional way to override parameter name. Requested by some users (stackoverflow)Example:
To make override work, one need to specify both
[Column]
and[UseColumnAttribute]
attributes, for example:Rules:
[Column]
and either[UseColumnAttribute]
or[UseColumnAttribute(true)]
is defined, than override will work[UseColumnAttribute(false)]
is explicitly specified, then overriding will not happen[Column]
is specified, but[UseColumnAttribute]
is missing, then DAP043 will be emitted to the user: "Attach the [UseColumnAttribute] attribute to make Dapper consider [Column]"[DbValue]
with propertyName
is specified, then a warning message will be emitted to the user: DAP042 "A column name is specified via both [DbValue] and [Column]; 'Closes #36