Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>if anyone is keeping track, this is the solution that ended up working for me. Thanks to everyone who commented and made suggestions... it eventually lead me to what i have below.</p> <pre><code> ctx.ContextOptions.LazyLoadingEnabled = true; var myQuery = from appt in ctx.Appointments where appt.VisitId == visitId &amp;&amp; appt.MasterLookup.LookupDescription.ToUpper() != Rescheduled &amp;&amp; appt.Site.PracticeID == practiceId &amp;&amp; appt.MasterLookup.LookupDescription.ToUpper() != Cancelled orderby appt.AppointmentId descending select appt; var myAppt = myQuery.FirstOrDefault(); ctx.LoadProperty(myAppt, a =&gt; a.EncounterReason); ctx.LoadProperty(myAppt, a =&gt; a.ScheduleColumnProfile); ctx.LoadProperty(myAppt, a =&gt; a.Visit); ctx.LoadProperty(myAppt, a =&gt; a.MasterLookup); ctx.LoadProperty(myAppt, a =&gt; a.User1); ctx.LoadProperty(myAppt, a =&gt; a.User2); ctx.LoadProperty(myAppt, a =&gt; a.PatientReferredProvider); var myVisit = myAppt.Visit; ctx.LoadProperty(myVisit, v =&gt; v.Patient); ctx.LoadProperty(myVisit, v =&gt; v.Patient_CoPay); ctx.LoadProperty(myVisit, v =&gt; v.VisitInstructions); ctx.LoadProperty(myVisit, v =&gt; v.EligibilityChecks); var pat = myVisit.Patient; ctx.LoadProperty(pat, p =&gt; p.PatientInsurances); //load child insurances foreach (PatientInsurance patIns in myAppt.Visit.Patient.PatientInsurances) { ctx.LoadProperty(patIns, p =&gt; p.InsuranceType); ctx.LoadProperty(patIns, p =&gt; p.InsuranceCarrier); } //load child instruction sheets foreach (VisitInstruction vi in myAppt.Visit.VisitInstructions) { ctx.LoadProperty(vi, i =&gt; i.InstructionSheet); } //load child copays foreach (Patient_CoPay coPay in myAppt.Visit.Patient_CoPay) { ctx.LoadProperty(coPay, c =&gt; c.User); } //load child eligibility checks foreach (EligibilityCheck ec in myAppt.Visit.EligibilityChecks) { ctx.LoadProperty(ec, e =&gt; ec.MasterLookup); ctx.LoadProperty(ec, e =&gt; ec.EligibilityResponse); } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload