Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6957525
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T15:00:51+00:00 2026-05-27T15:00:51+00:00

I am new to Silverlight RIA services and I have a basic working prototype

  • 0

I am new to Silverlight RIA services and I have a basic working prototype that utilizes the RIA services with the EntityFramework. Now that I have moved on to the actual project, I am wondering how to utlize non-EntityFramework objects but still use RIA Controls such as the System.Windows.Controls.DomainServices.DomainDataSource so that I can paginate, etc. For example, in my working prototype, I have:

[EnableClientAccess()]
public class RequestService : LinqToEntitiesDomainService<MyEntities>
{
    public IQueryable<RequestData> GetRequests()
    {
        ... LINQ query removed ...
    }
}

When I change IQueryable<RequestData> to IQueryable<MyRequestData> where MyRequestData is a custom public class I created (and convert the Entity data to ) and then rebuild the application, the client Silverlight application no longer sees the query (build errors).

So my question is, how can I leverage these custom objects in a similar fashion to the EntityFramework objects so that I can still apply pagination, etc?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T15:00:52+00:00Added an answer on May 27, 2026 at 3:00 pm

    You can create a POCO class and assign the Key attribute to one of its properties like this…

    public class MyClass
    {
        [Key]
        public string Name { get; set; }
        public int Age { get; set; }
    }
    

    Then you can create a DomainService class that contains a way to get at the POCO class like this…

    [EnableClientAccess()]
    public class DomainService1 : DomainService
    {
        public List<MyClass> GetData()
        {
            return new List<MyClass>(){new MyClass{Name = "Henry", Age = 33}};
        }
    }
    

    This method returns a list of MyClass with a single element in it. But you could return almost anything.

    Then on the client side you can invoke the Domain Service like this…

     public MainPage()
            {
                InitializeComponent();
                DomainService1 ds1 = new DomainService1();
                var x = ds1.Load(ds1.GetDataQuery());
                x.Completed += new EventHandler(x_Completed);
            }
            void x_Completed(object sender, EventArgs e)
            {
                // process the results here
            }
    

    In the event callback, you can cast the sender argument to a LoadOperation and get the data you wanted…

    The trick comes from using the ‘Key’ attribute. That makes the whole thing work.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am new to using RIA Services in Silverlight. I have created a DomainDataSource.
I am new to silverlight, WCF RIA services. We have a medium size financial
I have developed a silverlight application with WCF-RIA services and is working fine. I
Warning - new to Silverlight / RIA Services / etc. I have a business
I can create new Silverlight App with .NET RIA Services enabled. But when I
I am new to WCF & RIA services and have what seems like a
I have an existing WCF RIA project built on the Release Candidate; I'm now
I'm using WCF RIA Services and I have a domain service method that returns
I have created a RIA services class library project and things are not going
I've went through the basic tutorials associated with Silverlight and Ria Services and I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.