<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="http://syndication.webwiz.co.uk/rss_namespace/">
 <channel>
  <title>DevForce Community Forum : Mapping stored procedure to entity</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2010 : Mapping stored procedure to entity</description>
  <pubDate>Wed, 13 May 2026 18:18:41 -700</pubDate>
  <lastBuildDate>Fri, 28 Oct 2011 13:03:11 -700</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 9.69</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>www.ideablade.com/forum/RSS_post_feed.asp?TID=3063</WebWizForums:feedURL>
  <image>
   <title>DevForce Community Forum</title>
   <url>http://www.ideablade.com/forum/forum_images/IdeaBlade_logo_tm.png</url>
   <link>http://www.ideablade.com/forum/</link>
  </image>
  <item>
   <title>Mapping stored procedure to entity : Paolo,I can&amp;#039;t update/delete...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3063&amp;PID=11962#11962</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=892" rel="nofollow">sbelini</a><br /><strong>Subject:</strong> 3063<br /><strong>Posted:</strong> 28-Oct-2011 at 1:03pm<br /><br />Paolo,<div><br></div><div>I can't update/delete a projection because it is not mapped to anything in the datasource. i.e. you can't delete 'half' Employee.</div><div>If you want to perform these operations, than you should be retrieving the whole entity.</div><div><br></div><div>eg consider the table Employees with the following columns:</div><div>ID &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;int&nbsp;</div><div>Name &nbsp; &nbsp; &nbsp; &nbsp;varchar</div><div>HireDate &nbsp; datetime</div><div><br></div><div>and the Employee entity mapped to the table above:</div><div><div>ID &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;int&nbsp;</div><div>Name &nbsp; &nbsp; &nbsp; &nbsp;string</div><div>HireDate &nbsp; datetime</div></div><div><br></div><div>if you have a SP that returns all columns, you can map the result to an entity:</div><div><br></div><div>SELECT * FROM Employees</div><div><br></div><div>However, if you are only retrieving some columns you can't map it to an entity because the result does not compose an entity:</div><div><br></div><div>SELECT Name, HireDate FROM Employees</div><div><br></div><div>Regards,</div><div>&nbsp; &nbsp;Silvio</div>]]>
   </description>
   <pubDate>Fri, 28 Oct 2011 13:03:11 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3063&amp;PID=11962#11962</guid>
  </item> 
  <item>
   <title>Mapping stored procedure to entity :   recieved!but can I set to...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3063&amp;PID=11958#11958</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1136" rel="nofollow">pponzano</a><br /><strong>Subject:</strong> 3063<br /><strong>Posted:</strong> 27-Oct-2011 at 11:17pm<br /><br />recieved!<div>but can I set to a complex type funcion of update/delete read? I don't think so, but I ask...</div><div>&nbsp;</div><div>why should I use complex type instead of POCO for my DAL?</div><div>&nbsp;</div><div>&nbsp;</div>]]>
   </description>
   <pubDate>Thu, 27 Oct 2011 23:17:51 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3063&amp;PID=11958#11958</guid>
  </item> 
  <item>
   <title>Mapping stored procedure to entity : Hi Paolo,DevForce does support...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3063&amp;PID=11952#11952</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=892" rel="nofollow">sbelini</a><br /><strong>Subject:</strong> 3063<br /><strong>Posted:</strong> 27-Oct-2011 at 11:02am<br /><br /><span ="Apple-style-span" style="font-family: 'Times New Roman'; line-height: normal; font-size: medium; "><div style=": rgb255, 255, 255; margin-left: 1px; margin-top: 1px; margin-right: 1px; margin-bottom: 1px; font-family: Verdana, Arial, Helvetica, sans-serif; color: rgb0, 0, 0; font-size: 12px; line-height: 1.4; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; -: n&#111;ne; ">Hi Paolo,<div><br></div><div>DevForce does support mapping Stored Procedures to Entities.&nbsp;</div><div><br></div><div>In order to do that you have to return all columns of a given table (i.e. all mapped properties of an entity).</div><div><br></div><div>In the&nbsp;<a href="http://drc.ideablade.com/xwiki/bin/view/&#068;ocumentati&#111;n/code-sample-stored-procedure-queries-silverlight" target="_blank">DevForce Resource Center</a>&nbsp;you will find a sample/walkthrough&nbsp;demonstrating it.</div><div><br></div><div>Regards,</div><div>&nbsp; &nbsp;Silvio.</div></div></span>]]>
   </description>
   <pubDate>Thu, 27 Oct 2011 11:02:21 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3063&amp;PID=11952#11952</guid>
  </item> 
  <item>
   <title>Mapping stored procedure to entity : Dear all,We have a stored procedure...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3063&amp;PID=11950#11950</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1136" rel="nofollow">pponzano</a><br /><strong>Subject:</strong> 3063<br /><strong>Posted:</strong> 27-Oct-2011 at 6:03am<br /><br />Dear all,<br><br>We have a stored procedure that returns three columns (ID Int32, DESCRIPTION String, COUNTRY String).<br>We have tried to bind it to an entity (manually defined) and we have also created a Function Import via the wizard.<br><br>It results in a EntityServerException thrown at:<br><br><div style="font-family: C&#111;nsolas; font-size: 10pt; color: black; : white;"><p style="margin: 0px;"><span style="color: blue;">void</span> res_Completed(<span style="color: blue;">object</span> sender, <span style="color: #2b91af;">EntityQueriedEventArgs</span> e)</p><p style="margin: 0px;">&nbsp;&nbsp;&nbsp;&nbsp; {</p><p style="margin: 0px;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; e.Results.Cast&lt;MyEntityType&gt;().ForEach(MyList.Add);</p><p style="margin: 0px;">&nbsp;&nbsp;&nbsp;&nbsp; }</p></div><br>The exception message is:<br>Schema specified is not valid. Errors: <br>Model1.msl(14,6) : error 2062: No mapping specified for instances of the EntitySet and AssociationSet in the EntityContainer TEST_IDEAEntities.<br><br>Using complex types it works. Does DevForce support mappint SP to Enities?<br>Regards,<br>Paolo<br>]]>
   </description>
   <pubDate>Thu, 27 Oct 2011 06:03:18 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3063&amp;PID=11950#11950</guid>
  </item> 
 </channel>
</rss>