2
Answers

Database

Ask a question

I am trying to move a C# project over to Silverlight. How would I do something similar to this in Silverlight?

 

The code below works and I can access the data using CTA[0].performance

 

CTAEntities publishCTA = new CTAEntities();

 

List<Track> CTA = new List<Track>();

 

ObjectQuery<Track> Querystring = "it.FundId = " + ID.ToString();

 

CTAQuery = publishCTA.Tracks.Where(Querystring).Include("Admin");

CTA = CTAQuery.ToList();

 

 

I used RIA service and got this far, but CTA[0].performance give the error ArgumentOutOfRangeException

 

List<Track> CTA = new List<Track>();

 

var ctaContext = new CtaDomainContext();

 

ctaContext.Load(ctaContext.GetTrackByIDQuery(90003144));

 

CTA = ctaContext.Tracks.ToList();

 

 

How do you access a sql database with Silverlight and store the values in a list?


Answers (2)