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

Migration to OpenAccess ORM

1 Answer 113 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.
Manuel
Top achievements
Rank 1
Manuel asked on 16 Jan 2011, 09:15 PM
Dear Ladies and Gentlemen,

Right now I use self made DAL which uses DataTables.
I map the DataTables to a Business Entity and the Business Entity will be maped to DTOs.
Thoese DTOs are exposed by WCF Services.

The WPF / Silverlight Client application (MVVM) maps the DTO to a light business class. (IDataErrorInfo, INotifypropertyChanged, IEditableObject.)
When a model is updated by the user, the object goes the same way back to the database.

Now I like to change the DAL. Insead of the DataTables I like to use your ORM Mapper.
Do you have an example, of:
* Map the entities to DTOs.
* Expose the DTOs via WCF.
* Validation (of entity properties)
* Change Tracking

Thank you,
Manuel

1 Answer, 1 is accepted

Sort by
0
Serge
Telerik team
answered on 19 Jan 2011, 10:13 AM
Hello Manuel,

 We are glad you are considering moving to Telerik OpenAccess ORM.

I think a good starting point for you will be to have a look at our N-Tier examples. We have put a lot of work into implementing comprehensive and well designed examples including WPF and WCF Plain services, WPF and WCF DataServices, SL and WCF RIA Services examples all built on top of MVVM. You will be able to find them (and a lot more examples) in our SDK.

In the end it is pretty straight forward to map you database with OpenAccess and then use a custom T4 template that we provide in order to generate DTOs and expose them trough a service. As to validation currently we do not provide anything in regard to entity properties however we have planned development on the matter in the near future. And as to change tracking it can be easily achieved by accessing the inner scope object of the context that has the tracking interface exposed, if you need more info on the matter please say so. Or you can retrieve the changes that are planned for the next commit and use that information. 

Please have a look at our examples and get back to us if you need further assistance, we are looking forward to hearing from you. 

All the best,
Serge
the Telerik team
Accelerate your learning with industry's first Telerik OpenAccess ORM SDK. Download today.
Tags
Getting Started
Asked by
Manuel
Top achievements
Rank 1
Answers by
Serge
Telerik team
Share this question
or