StrataFrame Forum

Changing a properties name in BO mapper

http://forum.strataframe.net/Topic2524.aspx

By Scott - 8/29/2006

I am doing a conversion from our old Fox data to SQL, some of the field name in FoxPro are causing problems with the generated code for the BO mapper.  Field names like operator, or code cause the generated code to error and not compile.  Is there a way that I can 'change' the name of the field in the BO so that it will compile but still have it access the correct column in the underlaying table with out having to change all the Fox field names?

Scott

By Trent L. Taylor - 8/29/2006

Scott,

Just copy the generated code for a field (BO.designer.cs or BO.designer.vb Wink and go back into the BO Mapper.  Selec the field in question and then click "Custom Code."  Paste the copied field property into the text box at the bottom.  Change the name in brackets to a different name but leave the name that is returned alone.

Example:

Public Property [ChangeThisValue] As String

This way when you rebuild your partials it will not overwrite your changes.  This way you can just change the name of the field while still referencing the old field name internally.

By Scott - 8/29/2006

That worked great,  Thanks Trent
By Trent L. Taylor - 8/29/2006

Glad to hear it Smile