blob: 151cf9161c2016f39679fefb38ee51ee1f80222e [file] [log] [blame]
<!--?xml version="1.0" encoding="UTF-8"?-->
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<meta content="" name="abstract" />
<meta content="" name="description" />
<link href="../css/documentation.css" rel="stylesheet" type="text/css" />
<title></title>
<!--[if lte IE 7]><style>
.codeblock{
overflow:visible;
}</style><![endif]-->
<div id="wrapper">
<div id="container">
<h1 class="title topictitle1">Creating an OData Model Using Metadata File</h1>
<div class="body taskbody">
<p class="shortdesc">&nbsp;</p>
<div class="section context" id="loio499be3856baa45b1b2efacf2da6ea863__context_N10015_N10012_N10001">
<div class="tasklabel">
<h2 class="sectiontitle tasklabel">Context</h2>
</div>
<p class="p">The File Import function is used to import metadata files types (edmx and xml) to create an OData model.</p>
<div class="p">During the import of an EDMX file, the graphical information is computed, and the corresponding shapes are created in the OData Model Editor and arranged as follows:
<ul class="ul" id="loio499be3856baa45b1b2efacf2da6ea863__ul_xsr_tjp_mj">
<li class="li">Entities</li>
<li class="li">Complex Types</li>
<li class="li">Function Imports</li>
</ul>
</div>
<p class="p">To create an OData model using a service metadata file proceed as follows:</p>
</div>
<div class="tasklabel">
<h2 class="sectiontitle tasklabel">Procedure</h2>
</div>
<ol class="ol steps" id="loio499be3856baa45b1b2efacf2da6ea863__steps_pzz_3kw_sp">
<li class="li step stepexpand" id="loio499be3856baa45b1b2efacf2da6ea863__step_N10045_N10042_N10012_N10001"><span class="ph cmd">Create a project as outlined in the <a class="xref" href="Creating a Project.html" title="Creating a project">Creating a Project</a> section. </span></li>
<li class="li step stepexpand" id="loio499be3856baa45b1b2efacf2da6ea863__step_N1004E_N10042_N10012_N10001"><span class="ph cmd">Right click on the project in the Project Tree region, and select <span class="ph menucascade"><span class="ph uicontrol"><strong>New</strong>,</span> <strong><span class="ph uicontrol">Other</span></strong></span>.</span>
<div class="itemgroup stepresult">The <span class="ph emphasis emphasis"><strong>Select a Wizard</strong> </span>window displays.</div>
</li>
<li class="li step stepexpand" id="loio499be3856baa45b1b2efacf2da6ea863__step_N10067_N10042_N10012_N10001"><span class="ph cmd">Locate <strong><span class="ph emphasis emphasis">Ogee</span></strong> folder, expand it and select <span class="ph emphasis emphasis">OData Model</span>.</span></li>
<li class="li step stepexpand" id="loio499be3856baa45b1b2efacf2da6ea863__step_N10078_N10042_N10012_N10001"><span class="ph cmd">Click <strong><span class="ph emphasis emphasis">Next</span></strong> to proceed.</span>
<div class="itemgroup stepresult">
<p class="p">The <strong><span class="ph emphasis emphasis">Create New OData Model</span></strong> window appears.</p>
</div>
</li>
<li class="li step stepexpand" id="loio499be3856baa45b1b2efacf2da6ea863__step_N10091_N10042_N10012_N10001"><span class="ph cmd">Choose <span class="ph emphasis emphasis"><strong>Browse</strong> </span>or enter the folder name in the <span class="ph emphasis emphasis">Folder</span> field to select a project folder for the new OData model.</span></li>
<li class="li step stepexpand" id="loio499be3856baa45b1b2efacf2da6ea863__step_N100A2_N10042_N10012_N10001"><span class="ph cmd">Enter a name for the model in the <span class="ph emphasis emphasis"><strong>Model name</strong> </span>field.</span></li>
<li class="li step stepexpand" id="loio499be3856baa45b1b2efacf2da6ea863__step_N100AF_N10042_N10012_N10001"><span class="ph cmd">Select <span class="ph emphasis emphasis">OData Metadata File</span> from the list and click <strong><span class="ph emphasis emphasis">Next</span></strong>. </span>
<div class="itemgroup stepresult">The <span class="ph emphasis emphasis">New OData model based on a metadata file</span> system window appears.</div>
</li>
<li class="li step stepexpand" id="loio499be3856baa45b1b2efacf2da6ea863__step_N100C8_N10042_N10012_N10001"><span class="ph cmd">Enter the path to access the edmx or xml file, or click <strong><span class="ph emphasis emphasis">Browse</span></strong> to choose the file from the system and click <strong><span class="ph emphasis emphasis">Go</span></strong>.</span>
<div class="itemgroup stepresult">On selection of a valid file the contents of the file will be populated in the <span class="ph pname">Service details</span> region of the window.</div>
</li>
<li class="li step stepexpand" id="loio499be3856baa45b1b2efacf2da6ea863__step_N100D9_N10042_N10012_N10001"><span class="ph cmd">Click <strong><span class="ph emphasis emphasis">Finish</span></strong>.</span>
<div class="itemgroup stepresult">The selected file is converted to an OData service and displayed in the OData Model Editor. All the sections in entity element open up in a expanded state for editing.
<div class="note note" id="loio499be3856baa45b1b2efacf2da6ea863__note_N100DF_N100DC_N100D1_N10042_N10012_N10001"><strong><span class="notetitle">Note</span></strong> The errors in the imported model are indicated by the error icons. The <span class="ph emphasis emphasis">Problems</span> tab view in the properties view displays the errors in the model.</div>
<p class="p">The service is now ready to be edited and will be stored under the folder selected in the Project Explorer.</p>
</div>
</li>
</ol>
</div>
</div>
</div>