Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. WPF
  4. Problem with executing LINQuery from xmal page

Problem with executing LINQuery from xmal page

Scheduled Pinned Locked Moved WPF
csharphelpquestionasp-netdatabase
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Y Offline
    Y Offline
    yrishi
    wrote on last edited by
    #1

    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.

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups