Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / OpenAccess ORM > Telerik Data Services Wizard > Exposing SQL View via WCF Data Service

Not answered Exposing SQL View via WCF Data Service

Feed from this thread
  • Neil Mercer avatar

    Posted on Feb 22, 2011 (permalink)

    Hi,

    I have a simple MSSQL database with 2 tables that I've exposed via a WCF Data Service using the DSW to create it.  This works fine.

    Now I've gone back to the database and created a SQL View.  I've added it to the rlinq model and its generated a class to represent it fine.  However, when I run DSW to re-create the WCF Data Service and expose the View, it doesn't appear in the list of available classes.

    How can I make this work?

    Thanks,
    Neil.

    Reply

  • A.Alexandrov A.Alexandrov admin's avatar

    Posted on Feb 24, 2011 (permalink)

    Hello Neil Mercer,

    I am afraid that you will not be able to generate a data service for entities mapped to views, because generally CUD operations cannot be made against a view. That is why we filter all entities mapped to views. You can use entities mapped to tables instead.
    If any further questions arise, please do not hesitate to contact us.

    Best wishes,
    A.Alexandrov
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!

    Reply

  • Tommy Reynolds avatar

    Posted on Oct 11, 2011 (permalink)

    I have the same issue.  The intent is not to use the CUD operations on a view but however to expose the View Class from the service for the client application.   Can you provide or offer a solution on how to accomplish this with the ORM tool. 

    Also, can you briefly explain using the ORM tool which generates the classes for the entities vs. using a TT template.  I'm confused on if these are meant to work together or use one method vs. the other.  My understanding has been to let the ORM tool generate from the db, the entities, classes and service. 


    Reply

  • A.Alexandrov A.Alexandrov admin's avatar

    Posted on Oct 12, 2011 (permalink)

    Hi Tommy,

    The Data Services Wizard at the moment does not support generation of service for entities mapped to views, although we are working on this and it will be supported in one of the future releases. For the time being you can manually add this missing functionality in the generated service class as a workaround.

    As for your other question, there is no direct connection between the Data Services Wizard and the Visual Designer. When you create a Domain Model (diagram in RLINQ file) by defining your entities in the designer or directly retrieving them from the database, the result is a list of classes that can be used with or without a service. Those classes are created based on TT templates different
    from those that are used for the services.

    Once a Domain Model is generated or created, you are able to expose your persistent classes through several types of services using the Data Services Wizard.

    Do not hesitate to contact us if you need any further clarifications.

    All the best,
    A.Alexandrov
    the Telerik team

    Check out the latest stable build of Telerik OpenAccess ORM. Download it and benefit from our new Project Templates.

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / OpenAccess ORM > Telerik Data Services Wizard > Exposing SQL View via WCF Data Service
Related resources for "Exposing SQL View via WCF Data Service"

OpenAccess ORM Features  |  Documentation  |  Demos  |  Telerik TV  |  Step-by-step Tutorial   ]