title: What's the difference between GetColumnBaseName and GetColumnName in EF Core?
body: <p>In order to retrieve database column name, there are two methods: <code>GetColumnBaseName</code> and <code>GetColumnName</code>.</p>
  <ol>
  <li>What's the difference between them?</li>
  <li>Why <code>GetColumnName</code> requires <code>StoreObjectIdentifier</code> with <em>custom</em> values for table name? Doesn't <code>Metadata</code> know the table based on its parent <code>PropertyEntry</code> property?</li>
  </ol>
  <pre class="lang-cs prettyprint-override"><code>using var db = new TestContext();
  var customer = await db.Customers.FirstAsync(c =&gt; c.Id == 1);
  customer.Address = &quot;Jon&quot;;
  var entry = db.Entry(customer);
  var modifiedProperty = entry.Properties.First( p =&gt; p.IsModified );
  
  // Using &quot;GetColumnName&quot;
  var baseName = modifiedProperty.Metadata.GetColumnBaseName();
  
  // Using &quot;GetColumnName&quot;
  // Doesn't Metadata know the table?
  var id = StoreObjectIdentifier.Table(&quot;customer&quot;, schema: &quot;dbo&quot;);
  var columnName = modifiedProperty.Metadata.GetColumnName(id);
  
  </code></pre>