title: Object id or Object reference
body: <p>I am wondering if is it better to add a reference to an external object in my class or to add just its Id. I want to create those objects from database, using dapper or directly ADO.NET. So I want to know if there is a performance difference between the two approach.</p>
  
  <p>for example I have the following object </p>
  
  <pre><code>Class Object1
  {
      int Id {get;set;}
      string Name {get;set;}
      //... etc
  }
  </code></pre>
  
  <p>and I have another object Object2 which have a reference to Object1</p>
  
  <pre><code>Class Object2
  {
      int Id {get;set;}
      //is it better to add this
      Object1 object1 {get;set;}
      //or to add just an Id
      int objectId {get;set;}
  }
  </code></pre>
  
  <p>Object2 may have other references to other objects</p>