title: Model question in MVC3
body: <p>I have a basic question in MVC3. I am starting to write out Models for my project. I understand Models are in a way tables in my relational database layer. How do I specify a class attribute (field in a table) as  a FK. I know the [Key] qualifier for PKs. For example :</p>
  
  <pre><code> public class Class1
  {
      [Key]
      public int MyID { get; set; }
      public string myDes {get;set;}
  
  }
  </code></pre>
  
  <p>In the above example MyId is a PK in Class1. How do I use this MyId in a another class and use it as FK.</p>
  
  <p>EDIT: Is this correct?</p>
  
  <pre><code>public class Class2
  </code></pre>
  
  <p>{
      [Key]
      public int SecondID { get; set; }</p>
  
  <pre><code>[ForeignKey("MyId")]
  public string MyId{ get; set; }
  </code></pre>
  
  <p>}</p>
  
  <p>Class1 and Class2 are in two different .cs files.</p>