locked
Silverlight Project Architecture

    Question

  • Hello,

    I am developing a silverlight project that is hosted in a ASP.NET MVC project. Currently I only have two projects, UI.Web and UI.Silverlight. I want to add a RIA service to access a database in silverlight. Ive created a new Class Library project called UI.Data, which currently has my Entity Framework Data Model inside. My questions is what project should I make to host the RIA service and how can I make it so that the DomainService can auto-generate the metadata file that is required to use the RIA service in silverlight? What is the proper way to setup the solution so that things are seperated?

    How I would like my Solution to look:

    1. [UI.Data] - Class Library
    2. [UI.DataService] - ???
    3. [UI.Web] - ASP.net MVC
    4. [UI.Silverlight] - Silverlight 4

    • Edited by MichaelQuint Wednesday, January 04, 2012 2:29 PM
    Wednesday, January 04, 2012 2:27 PM

All replies

  • Ok, I figured it out on my own, just incase anyone also wanted to know. here is how to do it.

     

    1. [Class Library ] - This has your Entity Framework Model, and DomainService to the model.
    2. [ WCF RIA Class Library] - This should connect to the Class Library that contains the Entity Framework Model, and DomainService.
    3. [ Web Project ] - This should refernce the Class Library project that is hosting the Entity Framework Model and DomainService.
    4. [ Silverlight ] - This should have the RIA refernce set to the Web Project.
    • Proposed as answer by Praveen Subram Saturday, January 14, 2012 5:24 AM
    Friday, January 06, 2012 7:50 PM