I'm trying OpenAccess ORM and I have a question.
I watched some webcast on telerikTv and I understood how to expose my classes from db with Astoria to Silverlight.
But I need to write some custom classes in my solution and I want view this classes in Service's project and in Silverlight project.
With RIA, I can do this but with this ORM that not support RIA?
how can I do?
thanks
4 Answers, 1 is accepted
Can you share some additional information over those classes. Are those classes supposed to be persistent ? Do you want them to be some kind of wrapper classes for your persistent classes. Please shed some light over your goal in order for us to be able to provide you with an adequate solution.
Thank you in advance.
Sincerely yours,
Petar
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Is this possible? via Class library (DLL).
The reason for exposure is to simplify serialization/ deserialzation. Both client and WCF must remain stateless.
thanks.
It is usually not a good idea to use the same object you got from OpenAccess and transport them over the WCF service. As all of them are usually bound to a context (or scope), then cannot function without it. You can use the Data Services Wizard to create classes based on your OpenAccess classes that you can use for this purpose. The wizard will also generate your service code and assemblers for you object so that you can easily go from an OpenAccess object to a DTO object.
You could also use the approach from the following sample: WCF Northwind N-Tier Application. There the classes are additionally written by the user and the assembler pattern is being used to populate these objects.
I do hope this is helpful, but if you feel this is not the case please let us know.
Serge
the Telerik team