Can't access DomainContext via RIA Services

Posted on 2009-12-21
Last Modified: 2016-05-02
I'm building Silverlight App with RIA Services

I've created strongly typed domain service called ContactsDomainService.

The problem is that I can't access it in SL app like this

private void OKButton_Click(object sender, RoutedEventArgs e)
  ContactsDomainContext contactsContext = new

Nevertheless it is auto-generated in Contacts.Web.g.cs

Have I missed smth? TIA
Question by:Sovereign
    LVL 42

    Expert Comment

    did ContactsDomainService.cs and ContactsDomainService.metadata.cs were generated?

    Accepted Solution

    Yeap, I've found that by default the Contacts.Web.g.cs isn't included in the project. I've added it manually and it worked. Is it correct? I thought it should understand code generated in Generated_Code folder.

    Featured Post

    6 Surprising Benefits of Threat Intelligence

    All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

    Join & Write a Comment

    Suggested Solutions

    Title # Comments Views Activity
    Creating JSON file in Universal Windows Application 4 43
    WiX Installer 2 40
    How to count json data 2 42
    Get the last inserted ID 11 55
    Article by: Ivo
    Anonymous Types in C# by Ivo Stoykov Anonymous Types are useful when  we do not need to follow usual work-flow -- creating object of some type, assign some read-only values and then doing something with them. Instead we can encapsulate this read…
    This article describes a simple method to resize a control at runtime.  It includes ready-to-use source code and a complete sample demonstration application.  We'll also talk about C# Extension Methods. Introduction In one of my applications…
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.
    In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now