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 7511071
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T23:26:18+00:00 2026-05-29T23:26:18+00:00

Hi i am using WCF RIA services class in Silverlight. I do have a

  • 0

Hi i am using WCF RIA services class in Silverlight.

I do have a line chart control named mcChart in which i have bound the item source to Date and Amount properties of class customer.

public class Customer
    { 
      public DateTime Date{ get; set; }
      public int Amount{ get; set; }    
    } 

I do have this method through WCF ria domain service class to access the sql table gardenwater{Id, Date, Amt}:

public IQueryable<gardenwater> GetGardenwaters()
        {
            return this.ObjectContext.gardenwaters;
        }

Now i want to store the data in List<Customer> cust = new List<Customer>(); so that it can be shown in the chart.

I have tried like this :

EntityQuery<gardenwater> inquery = from c in wdc.GetGardenwatersQuery()
                                   select new { Date =Convert.ToDateTime(c.Date), Amount =Convert.ToInt32(c.usedwater) };

and then

foreach (var gardenWater in inquery )
            {
                cust.Add(new Customer() { Date = Convert.ToDateTime(gardenWater.Date), Amount = Convert.ToInt32(gardenWater.usedwater) });
            }

 mcChart.DataContext = cust;

Doing all the above i am not able to get any good results.

I want to display the data through storing SQL table data in Class properties.

Please suggest me what can i do or what mistakes i am doing ?

  • 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-29T23:26:22+00:00Added an answer on May 29, 2026 at 11:26 pm

    I got it resolved by now…i can use following

                private ContextName context;
                private LoadOperation LoadGardenWater;
                private void GetGardenWater()
                {
                    context = new ContextName();
                    context.GardenWaters.Clear();
                    var query = context.GetGardenWaterQuery();
                    LoadGardenWater = context.Load<GardenWater>(query);
                    LoadGardenWater.Completed +=new EventHandler(LoadGardenWater_Completed);
                }
    
                void LoadGardenWater_Completed(object sender, EventArgs e)
                {
                    List<Customer> cust = new List<Customer>();
                    if (LoadGardenWater.Entities != null || LoadGardenWater.Entities.Count()> 0)
                    {
                        foreach (GardenWater item in LoadGardenWater.Entities)
                        {
                            cust.Add(new Customer()
                            {
                                Amount = Convert.ToInt32(item.Amount),
                                Date = Convert.ToDateTime(item.Date)
                            });
    } 
    }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Silverlight 3 app using WCF RIA Services and Entity Framework for
I am developing a silverlight 3 application using WCF RIA services. I am using
I'm using the WCF RIA Services Beta with Silverlight 3.0 and I want to
I'm using WCF RIA Services and I have a domain service method that returns
In a Silverlight 4 proj i'm using WCF RIA services, MVVM principles and EF
I'm doing unit testing for our WCF RIA services, which have RequiresRole or RequiresAuthentication
I am using wcf ria services in a silverlight application. I am looking at
I have a WCF Ria service which invokes several wcf services (non Ria). I'm
I'm developing an application using WCF Ria services and Silverlight. Performance and scalability is
Hello guys im using WCF RIA Services i have domain services where i wrote

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.