Connecting a DomainContext and loading data manually in Silverlight 4 RC application

Posted by Redburn on Stack Overflow See other posts from Stack Overflow or by Redburn
Published on 2010-04-19T22:29:29Z Indexed on 2010/04/19 22:33 UTC
Read the original article Hit count: 495

Filed under:
|

I am new to WCF & RIA services and have what seems like a basic problem. I have multiple times in my silverlight 4 RC application dragged and dropped from my datasource window to my form and have returned information from the database. However I have a need to query the database for other information (Building a report) When I try to use the following code, I recieve no error, but I also do not get any information back from the service.

//Global
public UMSDomainContext _umsDomainContext = new UMSDomainContext();

//In the Initialization portion
_umsDomainContext.Load(_umsDomainContext.GetUMOptionsQuery());
//Queries
 var name = from n in _umsDomainContext.UMOptions
                              select n.DistrictName;

                var street1 = from c in _umsDomainContext.UMOptions
                              select c.Address1;

                var street2 = from c in _umsDomainContext.UMOptions
                              select c.Address2;

                var city = from c in _umsDomainContext.UMOptions
                              select c.City;

                var zip = from c in _umsDomainContext.UMOptions
                              select c.Zip;

Im calling the current additional assem.

using System.Linq;
using System.ServiceModel.DomainServices.Client;
using System.ComponentModel.DataAnnotations;
using MTT.Web;

© Stack Overflow or respective owner

Related posts about Silverlight4

Related posts about wcfservice