title: Linq To SQL Without Explicit Foreign Key Relationships
body: <p>I am working with a few legacy tables that have relationships, but those relationships haven't been explicitly set as primary/foreign keys.  I created a .dbml file using "Linq To Sql Classes" and established the proper Case.CaseID = CaseInfo.CaseID association.  My resulting class is CasesDataContext.</p>
  
  <p>My Tables (One to many): </p>
  
  <pre><code>Case
  ------------------
  CaseID (int not null)
  MetaColumn1 (varchar)
  MetaColumn2 (varchar)
  MetaColumn3 (varchar)
  ...
  
  
  CaseInfo
  ------------------
  CaseInfoID (int)
  CaseID (int nulls allowed)
  CaseInfoMeta (varchar)
  ...
  </code></pre>
  
  <p>I'm new to LinqToSQL and am having trouble doing.. </p>
  
  <pre><code>CasesDataContext db = new CasesDataContext();
  var Cases = from c in db.Cases
              where c.CaseInfo.CaseInfoMeta == "some value"
              select c;
  </code></pre>
  
  <p><em>(Edit) My problem being that CaseInfo or CaseInfos
  is not available as a member of Cases.</em></p>
  
  <p>I heard from a colleague that I might try ADO.Net Entity Data Model to create my Data Context class, but haven't tried that yet and wanted to see if I'd be wasting my time or should I go another route. Any tips, links, help would be most appreciated.</p>