# C1.Schedule.MappingCollectionBase-1.IdMapping

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Schedule_MappingCollectionBase_1_IdMapping_" data-uid="C1.Schedule.MappingCollectionBase`1.IdMapping*">IdMapping Property
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Schedule_MappingCollectionBase_1_IdMapping_" data-uid="C1.Schedule.MappingCollectionBase`1.IdMapping*"></a>
<h4 id="C1_Schedule_MappingCollectionBase_1_IdMapping" data-uid="C1.Schedule.MappingCollectionBase`1.IdMapping">IdMapping</h4>
<div class="markdown level1 summary"><p>Returns <a class="xref" href="C1.Schedule.MappingInfo.html">MappingInfo</a> object for the <a class="xref" href="C1.Schedule.BasePersistableObject.Id.html#C1_Schedule_BasePersistableObject_Id">Id</a> property.
If the storage object is bound to a data source via its DataSource property,
the properties of this object allow the <a class="xref" href="C1.Schedule.BasePersistableObject.Id.html#C1_Schedule_BasePersistableObject_Id">Id</a> property<br>
to be bound to the appropriate field in the data source.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">[C1Category(&quot;Mapping&quot;)]
[C1Description(&quot;Mapping.Id&quot;, &quot;Allows the Id property of BasePersistableObject to be bound to appropriate field in the data source.&quot;)]
public MappingInfo IdMapping { get; set; }</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">&lt;C1Category(&quot;Mapping&quot;)&gt;
&lt;C1Description(&quot;Mapping.Id&quot;, &quot;Allows the Id property of BasePersistableObject to be bound to appropriate field in the data source.&quot;)&gt;
Public Property IdMapping As MappingInfo</code></pre>
</div>
<h5 id="C1_Schedule_MappingCollectionBase_1_IdMapping_remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>Each object derived from <a class="xref" href="C1.Schedule.BasePersistableObject.html">BasePersistableObject</a> is identified
by either Id or Index property.
To allow data to be correctly restored from your data sources you should specify mapping
either for the <a class="xref" href="C1.Schedule.MappingCollectionBase-1.IdMapping.html#C1_Schedule_MappingCollectionBase_1_IdMapping">IdMapping</a> or
for the <a class="xref" href="C1.Schedule.MappingCollectionBase-1.IndexMapping.html#C1_Schedule_MappingCollectionBase_1_IndexMapping">IndexMapping</a>.
It makes sense in case if you bind to your data storages of Resources, Labels,
Contacts or Categories.
C1Schedule saves only Ids or Indexes of these objects in AppointmentSorage.
If there is no mapping for IdMapping or IndexMapping, C1Schedule won't be able to
identify Appointment's properties correctly in storages initialized by your data.</p>
</div>
</div>
