This is a migrated thread and some comments may be shown as answers.

Runtime Schema Changes

2 Answers 78 Views
Getting Started
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Murray
Top achievements
Rank 1
Murray asked on 16 Aug 2011, 08:25 AM
Hi 

I would like to utilise ORM for the ability to make runtime schema changes.

I am just having issues finding the appropriate documentation on this feature.

Do you have any example projects that show this working ( ie add a table / and or columns to database at runtime)

And also what is the recommended way to utilise these features. is it the Fluent API?

Thanks

Murray

2 Answers, 1 is accepted

Sort by
0
Murray
Top achievements
Rank 1
answered on 16 Aug 2011, 08:36 AM
Ah I did find the documentation

http://www.telerik.com/help/openaccess-orm/openaccess-tasks-howto-use-artificial-fields.html


My question then would be is there a way built into OpenAccess to make the changes to the database for you after you update the xml?

Or is this something that has to be handled externally to OpenAccess?

0
Nikola
Telerik team
answered on 18 Aug 2011, 08:54 AM
Hello Murray,

The OpenAccess API contains methods for generating and executing DDL scripts based on the OpenAccess metadata. I have prepared several links for your convenience.

1. You can have a look here here for an overview of utilizing artificial types/properties by using the Fluent Mapping API.
2. You should check the Artificial Types part in particular because it contains example code regarding executing a DDL script based on artificial types and properties.
3. Finally if you need more information you can check the OpenAccess API reference following this link.

Choosing between the Fluent API and XML editing approach is up to you. I personally would go with the Fluent API because I believe it makes things simple and obvious.

Hope that helps and have a nice day.

Greetings,
Nikola
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

Tags
Getting Started
Asked by
Murray
Top achievements
Rank 1
Answers by
Murray
Top achievements
Rank 1
Nikola
Telerik team
Share this question
or