title: Reference to Lookup Entities without Adding New One
body: <p>I have 2 EF Entities:</p>
  
  <pre><code>public partial class CustomerEntity
  {
      public int CustomerId { get; set; }
      public string CustomerName { get; set; }
      public virtual ICollection&lt;RoleEntity&gt; Roles { get; set; }
  }
  
  public partial class RoleEntity
  {
      public int RoleId { get; set; }
      public string RoleName { get; set; }
  }
  </code></pre>
  
  <p>This is my insert method:</p>
  
  <pre><code>public int? InsertCustomer(CustomerEntity customer)
  {
      _context.CustomerEntities.Add(customer);
  
      try
      {
          return _context.SaveChanges();
      }
      catch (DbEntityValidationException exception)
      {
          return null;
      }
  }
  </code></pre>
  
  <p>This is method to create new customer:</p>
  
  <pre><code>public int CreateNewCustomer(string Name)
  {
      // Some mapping to CustomerEntity
      var _customerEntity = new CustomerEntity
      {
          CustomerName = Name,
          Roles = new List&lt;RoleEntity&gt;
          {
              new RoleEntity
              {
                  RoleId = 1
              }
          }
      };
      return InsertCustomer(_customerEntity);
  }
  </code></pre>
  
  <p>The RoleEntity is a 'lookup' table, means it has preset records and will never have new one. </p>
  
  <p>Everytime new CustomerEntity is created, it will have one or more role. How can I insert new CustomerEntity without creating new Role in database?
  My CreateNewCustomer method above will insert new Customer as well as new Role in database while I only want new Customer whose role reference to existing Role in database (with id 1).</p>