Use generated classes with WCF.

3 posts, 1 answers
  1. Jose Mejia
    Jose  Mejia avatar
    107 posts
    Member since:
    May 2009

    Posted 14 Mar 2012 Link to this post

    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. Jose Mejia
    Jose  Mejia avatar
    107 posts
    Member since:
    May 2009

    Posted 15 Mar 2012 Link to this post

    Anyone?
  3. DevCraft banner
  4. Answer
    Serge
    Admin
    Serge avatar
    375 posts

    Posted 15 Mar 2012 Link to this post

    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 >>
Back to Top