Suggest your thoughts on this design
<p>I am working on a business layer functionality.</p>

<p>There are two layers :- 
1) Entity Data Model Layer which is the logical layer</p>

<p>This logical layer maps to a storage layer.</p>

<p>There are different classes in each of this layer.</p>

<p>The data storage layer has subject, test and result as objects
The logical layer has entity as objects.</p>

<p>I am writing a code which accepts an object of logical layer and converts it to storage layer objects.
It does so by reading the schema of the logical layer. </p>

<p>The schema of the logical layer is stored in an xml file and it has attributes which map to physical layer.</p>

<p>My code will interpret this schema and convert to appropriate physical layer objects.</p>

<p>The class which I have written is as follows :- </p>

<pre><code>DataModelToStorageTranslator
{
 IStorageLayerObject TranslateToStorageLayer(ObjectOfLogicalLayer);
}
</code></pre>

<p>The different classes of the storage layer are derived from the IStorageLayerObject.</p>

<p>The client will check the type of object at runtime.</p>

<p>Is there a better way to achieve the same ?</p>

<p>My implementation is in C#</p>

<p>Thanks,
Vivek</p>
