Problem with executing LINQuery from xmal page
-
Dear All, I am using SilverLight 4 with Asp.Net 4.0 I am using edmx file in that I have put my required table which have relation in between. To access these table in MYPage.xaml, I have create service using bellow code //------------------------------------------------------------------------ public static void InitializeService(DataServiceConfiguration config) { // TODO: set rules to indicate which entity sets and service operations are visible, updatable, etc. // Examples: config.SetEntitySetAccessRule("Resource_MT", EntitySetRights.All); config.SetEntitySetAccessRule("ProjectResourceAllocations", EntitySetRights.All); // config.SetServiceOperationAccessRule("MyServiceOperation", ServiceOperationRights.All); config.DataServiceBehavior.MaxProtocolVersion = DataServiceProtocolVersion.V2; } //------------------------------------------------------------------------ After that I have create Service Reference. After this I have create My linq join query. after this, I want to execute this query. I am able to execute single table query like //--------------------------------------------------------------------------------- var dsQueryResource = (DataServiceQuery<ServiceReference2.Resource_MT>)queryResource; dsQueryResource.BeginExecute(OnResourcesQueryComplete, queryResource); //--------------------------------------------------------------------------------- But as i have two table which is 1)Resource_MT 2)ProjectResourceAllocations How can I do this?? As I am very new in Silverlight. Please Help me on this. For your information here is my LINQ join query //--------------------------------------------- var queryResource = from p in svcContext2.ProjectResourceAllocations join r in svcContext2.Resource_MT on p.ResourceID equals r.ResourceID where p.ProjectID == UserSelectedProjectID select r.FirstName; //--------------------------------------------- Waiting for your reply.