LightSwitch using external DB and WCF RIA Service

Answered LightSwitch using external DB and WCF RIA Service

  • 3 августа 2012 г. 16:00
     
     

    Hi,

    I have a LS app using a SQL 2012 DB.
    In the solution I've also added a WCF RIA Service library that is using the entities generated in LS following this article: http://lightswitchhelpwebsite.com/Blog/tabid/61/EntryId/47/WCF-RIA-Service-Combining-Two-Tables.aspx . In this library, I'm just re-creating a table with some computed fields. I've defined a default GetAllxxx() query for that and override the Count<T>() method of the derived DomainService class.
    In the LS app, I've just added a simple search screen for the entity from WCF RIA Service, but I always get an exception when trying to view the screen:
    {"An error occurred while executing the command definition. See the inner exception for details."}
    with an inner exception:
    {"Invalid object name 'dbo.TableName'."}

    If I'm creating a LS app and creating all the tables in the designer, everything works well with WCF RIA Service entity, but not with an external DB.

    Does anyone has an idea how to fix this?

    Thanks.

     

Все ответы