I have a project where I'm working with an older database and they used some un-code-friendly column names. I created a new attribute for ColumnNameOverride("actual name") and tweaked some of the system a little bit to use it. I enabled the use of the DatabaseColumn.PropertyName property to store the original property name (was previously, seemingly unused). I changed the DataTable.GetColumnByPropertyName(string) to use this column field instead of the Name since Name now was overridden by the attribute.
I added four generic tests to check: inserting data to the field, selecting the field, selecting with a field constraint, and updating the field. All 42 simple repo tests pass for Sql Server. I have not tested the T4 scripts. Please advise if I need to retro-fit those. I'll be happy to.
Hey Guys,
I have a project where I'm working with an older database and they used some un-code-friendly column names. I created a new attribute for ColumnNameOverride("actual name") and tweaked some of the system a little bit to use it. I enabled the use of the DatabaseColumn.PropertyName property to store the original property name (was previously, seemingly unused). I changed the DataTable.GetColumnByPropertyName(string) to use this column field instead of the Name since Name now was overridden by the attribute.
I added four generic tests to check: inserting data to the field, selecting the field, selecting with a field constraint, and updating the field. All 42 simple repo tests pass for Sql Server. I have not tested the T4 scripts. Please advise if I need to retro-fit those. I'll be happy to.
-Nathan