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

Use generated classes with WCF.

2 Answers 73 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Jose Mejia
Top achievements
Rank 1
Jose Mejia asked on 14 Mar 2012, 06:11 PM
Hello.

I know that this question was asked thousand times but I can't understand if how can I
transform my generated classes to entities which can be used within WCF, I mean add
DataContact, add DataMember and so on...?

I saw openaccess SDK Sofia Car Rental example, but I can't understand how to convert
domain classes into wcf classes?

I tried to use Data Wizards but it shows that I haven't got output project...
I host my wcf service in console app.

Thanks in advance.

2 Answers, 1 is accepted

Sort by
0
Jose Mejia
Top achievements
Rank 1
answered on 15 Mar 2012, 12:17 PM
Anyone?
0
Accepted
Serge
Telerik team
answered on 15 Mar 2012, 04:19 PM
Hello Jose, 

 For your first question you can actually tweak the code generation so that DataContract and DataMember attributes are generated for your model. Have a look at these help articles in order to get you started. 

And in order to generate the service code and DTO objects (wcf objects), you need to use the "Generate OpenAccess Domain Service..." wizard that you can find in the context menu of either an rlinq file or a web application.

Unfortunately we do not currently support console applications as the host of a service, though you should be able to generate into a web application and then just copy paste the necessary code.

I hope this helps and please do not hesitate to let us know if you face further trouble. 

Regards,
Serge
the Telerik team
Telerik OpenAccess ORM Q1 2012 release is here! Check out what's new or download a free trial >>
Tags
General Discussions
Asked by
Jose Mejia
Top achievements
Rank 1
Answers by
Jose Mejia
Top achievements
Rank 1
Serge
Telerik team
Share this question
or