For tracing/logging purposes, I would like to extract the database target field from an entity at runtime. This would not be done in the production environment but during dev/testing. So the overhead should not be a concern.
The business case here is that we are working with legacy database names which are quite cryptic. We have aliased those name in the LLBLGen designer so that they are more recoginizable. Our business analysts would like some reassurance that the fields match the existing documentation which has the legacy database field names.
So imagine an EmployeeEntity object with some fields as shown below.
Database -> Code:
EMP.EMP_L_NAME -> LastName
EMP.EMP_LN -> PhoneLine
EMP.EMP_PTR_ID -> PrinterId
EmployeeEntity employee = new EmployeeEntity(someValueHere);
Can I get extract the database target field from that entity?
That is, given employee.LastName or EmployeeFields.LastName, I would like to trace/log an entry with three values. First, the database value of that entity field ("SMITH"), second the entityfield name (I should be able to get this with IEntityField2.Name) and the database target field name (EMP.EMP_L_NAME).
Any suggestions?