# C1.Schedule.BasePersistableObject.Key

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Schedule_BasePersistableObject_Key_" data-uid="C1.Schedule.BasePersistableObject.Key*">Key Property
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Schedule_BasePersistableObject_Key_" data-uid="C1.Schedule.BasePersistableObject.Key*"></a>
<h4 id="C1_Schedule_BasePersistableObject_Key" data-uid="C1.Schedule.BasePersistableObject.Key">Key</h4>
<div class="markdown level1 summary"><p>Gets an array of objects representing the key of the <a class="xref" href="C1.Schedule.BasePersistableObject.html">BasePersistableObject</a>.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public object[] Key { get; }</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public ReadOnly Property Key As Object()</code></pre>
</div>
<h5 id="C1_Schedule_BasePersistableObject_Key_remarks">Remarks</h5>
<div class="markdown level1 remarks"><pre><code>&lt;p&gt;In the current version, the array always contains a single object.
</code></pre>
<p>It can be either an <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a> or <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.guid">Guid</a> value depending on
which one is actually used for binding this data.
For example, if you bind AppointmentStorage to the database and set
IndexMapping, this property will return an <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a> value.
If you set IdMapping, this property will return a <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.guid">Guid</a> value.</p>
<p>In future versions working with compound keys might be implemented.
In such case this property will return array of objects composing the key.</p>
</div>
</div>
