If you have a class lib (assembly) containing the model (persistent classes) and another assembly (or main program) consuming this assembly, you should set the UpdateDatabase property of that project to true. It is set in VS for the properties of the project. Click on the project, go to the properties tab and there you'll find the UpdateDatabase.
Usually it is in the project, where the app.config file containing the connection information for OA resides.
answered on 27 Aug 2009, 08:20 AM
You can do that in both run-time and design-time.
If you would like to do this in design time then you should write your artificial fields by hand in the app.config file. Once you are done just set the UpdateDatabase to true and rebuild. This will automatically create the required ddl script and update the database.
If you would like to use this in runtime, you should apply your artificial fields using the XML approach and use this code: