title: ServiceStack.OrmLite - how to include field from foreign key lookup?
body: <p>I'm trying out the ServiceStack MVC PowerPack, and am trying the included OrmLite ORM and am trying to get data from a table referenced by a foreign key without any idea how to do so.</p>
  
  <p>In the OrmLite examples that use the Northwind database, for example, would it be possible to return a Shipper object that included the "ShipperTypeName" as a string looked up through the foreign key "ShipperTypeID"?</p>
  
  <p>From <a href="http://www.servicestack.net/docs/ormlite/ormlite-overview" rel="nofollow">http://www.servicestack.net/docs/ormlite/ormlite-overview</a>, I'd like to add the ShipperName field to the Shipper class if possible:</p>
  
  <pre><code>[Alias("Shippers")]
  public class Shipper : IHasId&lt;int&gt;
  {
      [AutoIncrement]
      [Alias("ShipperID")]
      public int Id { get; set; }
  
      [Required]
      [Index(Unique = true)]
      [StringLength(40)]
      public string CompanyName { get; set; }
  
      [StringLength(24)]
      public string Phone { get; set; }
  
      [References(typeof(ShipperType))]
      public int ShipperTypeId { get; set; }
  }
  
  [Alias("ShipperTypes")]
  public class ShipperType : IHasId&lt;int&gt;
  {
      [AutoIncrement]
      [Alias("ShipperTypeID")]
      public int Id { get; set; }
  
      [Required]
      [Index(Unique = true)]
      [StringLength(40)]
      public string Name { get; set; }
  }
  </code></pre>