title: No backing field could be found for property of entity type and the property does not have a getter
body: <p>I am getting an exception</p>
  
  <p><code>System.InvalidOperationException : No backing field could be found for property 'ApartmentId' of entity type 'Address' and the property does not have a getter.</code></p>
  
  <p>This is my <code>Apartment</code> class:</p>
  
  <pre><code>public class Apartment
  {
      public Apartment(Address address)
      {
          Address = address;
      }
  
      private Apartment()
      {
      }
  
      public int Id { get; private set; }
      public Address Address { get; private set; }
  }
  </code></pre>
  
  <p>This is my <code>Address</code> value object class:</p>
  
  <pre><code>public class Address : IEquatable&lt;Address&gt;
  {
      private Address()
      {
      }
  
      public Address(string streetNumber, string streetName, string city, string state, string zipCode)
      {
          StreetNumber = streetNumber;
          StreetName = streetName;
          City = city;
          State = state;
          ZipCode = zipCode;
      }
  
      public string StreetNumber { get; private set; }
      public string StreetName { get; private set; }
      public string City { get; private set; }
      public string State { get; private set; }
      public string ZipCode { get; private set; }
  
      public bool Equals(Address other)
      {
          if (ReferenceEquals(null, other))
          {
              return false;
          }
  
          if (ReferenceEquals(this, other))
          {
              return true;
          }
  
          return String.Equals(StreetNumber, other.StreetNumber, StringComparison.OrdinalIgnoreCase) &amp;&amp;
                 String.Equals(StreetName, other.StreetName, StringComparison.OrdinalIgnoreCase) &amp;&amp;
                 String.Equals(City, other.City, StringComparison.OrdinalIgnoreCase) &amp;&amp;
                 String.Equals(State, other.State, StringComparison.OrdinalIgnoreCase) &amp;&amp;
                 String.Equals(ZipCode, other.ZipCode, StringComparison.OrdinalIgnoreCase);
      }
  }
  </code></pre>
  
  <p>In my entity configuration I use <code>builder.OwnsOne(a =&gt; a.Address);</code>. In my repository I make this call:</p>
  
  <pre><code>    public async Task&lt;Apartment&gt; GetByAddressAsync(Address address)
      {
          return await _context.Apartments.FirstOrDefaultAsync(a =&gt; a.Address.Equals(address));
      }
  </code></pre>
  
  <p>And it produces the exception above. Any ideas? I don't know why it says I have an 'ApartmentId' in my <code>Address</code> value object.</p>