title: Using existing database and EF code-first, mapping a lookup table to entity
body: <p>I am using entity framework, code first, 4.0, hitting an existing legacy database for read-only access. The database is normalized, so </p>
  
  <pre><code> Table [Event]
        [ID]
        [Date_Entered]
        [Event_Status_Key]
  
   Table [Event_Status]
        [Event_Status_Key]
        [Event_Status_Description]
  </code></pre>
  
  <p>My class looks like </p>
  
  <pre><code> public class Event
   {
         public DateTime DateEntered { get; set; }
         public string StatusDescription { get; set; }
   }
  </code></pre>
  
  <p>This is a WCF service layer application.</p>
  
  <p>My two questions:</p>
  
  <ol>
  <li><p>Is there any easy way to populate the status description without creating a second Dictionary-type object? I've seen questions like this: <a href="https://stackoverflow.com/questions/7954738/entity-framework-mapping-to-lookup-table">Entity Framework Mapping to Lookup table</a>, but they seem to be focused on object to object, and I really just want a primitive. I'd prefer using the fluent API as opposed to attributes. </p></li>
  <li><p>When the data is loaded, is any of the data cached at the code layer? Or does each check on the StatusDescription mean a separate call on the [Event_Status] table?</p></li>
  </ol>
  
  <p><strong>Edit:</strong> A possible (more subjective, which is why I didn't bring it up) third question is how close should the data entities match the database. Is it always a one-to-one field/table? Is what I'm doing (joining two tables into one data entity obejct) bad? </p>
  
  <p>Thanks. </p>