locked
SELECT QUERY RRS feed

  • Question

  • How to do this in RIA Service

    Select PhysicianName from Physicians where IDNo = 1


    i want to return the Physician Name


    tnx



    Sunday, December 5, 2010 1:59 AM

Answers

  • It would help to know what entities you are using, but let's assume  you have a Physicians entity.

    Public void TestMethod()
    {
    EntityQuery<Physician> query = 
        from p in context.GetPhysiciansQuery()
        where p.IDNo == 1
        select p;
    
    context.Load<Phisician>(query, lo =>
           {
              foreach(Physician p in context.Physicians)
              {
                 // Do something with each Dr.
              }
           }, null);
    
    }

    Hope this helps....

    -Scott

    Sunday, December 5, 2010 2:27 AM