<?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 : OData versus &#039;EntityState&#039;</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2010 : OData versus &#039;EntityState&#039;</description>
  <pubDate>Wed, 13 May 2026 05:42:41 -700</pubDate>
  <lastBuildDate>Mon, 21 May 2012 19:47:28 -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=3445</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>OData versus &#039;EntityState&#039; : Thanks for your assistance!  I...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3445&amp;PID=13622#13622</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1456" rel="nofollow">TonyHansen</a><br /><strong>Subject:</strong> 3445<br /><strong>Posted:</strong> 21-May-2012 at 7:47pm<br /><br />Thanks for your assistance!<DIV>&nbsp;</DIV><DIV>I started off following the video for Code Second to generate against a basic database I had already setup.&nbsp; Rather than building a Silverlight app, I have been&nbsp;attempting to build a Winforms n-tier app.&nbsp; </DIV><DIV>&nbsp;</DIV><DIV>Ran into stacks of problems with missing references etc, managed to solve all those, but then got stuck on the EntityState problem (which looks to have a resolution), so thought I'd switch to looking at OData ... and hit a wall there as well.</DIV><DIV>&nbsp;</DIV><DIV>Just like me to start breaking things my first time out! :-D</DIV><DIV>&nbsp;</DIV><DIV>I'll implement your suggestion this evening, and give it another shot.&nbsp; Again, thanks for your assistance!</DIV><DIV>&nbsp;</DIV><DIV>T</DIV>]]>
   </description>
   <pubDate>Mon, 21 May 2012 19:47:28 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3445&amp;PID=13622#13622</guid>
  </item> 
  <item>
   <title>OData versus &#039;EntityState&#039; :  Hi TonyHansen,I was able to...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3445&amp;PID=13617#13617</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=912" rel="nofollow">DenisK</a><br /><strong>Subject:</strong> 3445<br /><strong>Posted:</strong> 21-May-2012 at 3:09pm<br /><br />Hi TonyHansen,<div><br></div><div>I was able to reproduce the issue here. I'm assuming you're using Code First entities with "Code Second" method of template generation per your post here.&nbsp;<a href="http://www.ideablade.com/forum/forum_posts.asp?TID=3446&amp;PID=13611&amp;title=entitystate-property-not-available#13611" target="_blank">http://www.ideablade.com/forum/forum_posts.asp?TID=3446&amp;PID=13611&amp;title=entitystate-property-not-available#13611</a></div><div><br></div><div>If so, this is a bug specific to using Code First. I'll file a bug report. For now, the workaround is to add the following property to your IgnorePropertiesAttribute as follows.</div><div><br></div><div>&#091;IgnoreProperties(@"EntityAspect", @"AAAA_EntityAspectForSerialization")&#093;</div><div><br></div><div>If you have many entities, you can customize the T4 template so you don't have to manually write the above.&nbsp;<a href="http://drc.ideablade.com/xwiki/bin/view/&#068;ocumentati&#111;n/custom-code-generati&#111;n-template#H233Moveyourcustomgeneratortoitsownassembly" target="_blank">http://drc.ideablade.com/xwiki/bin/view/Documentation/custom-code-generation-template</a></div><div><br></div><div>I've modified our current OData tour sample so that it uses Code Second and a custom T4 template in its own assembly. You can download it here.&nbsp;<a href="uploads/912/ODataTour_WithCodeFirst.zip" target="_blank">uploads/912/ODataTour_WithCodeFirst.zip</a></div>]]>
   </description>
   <pubDate>Mon, 21 May 2012 15:09:21 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3445&amp;PID=13617#13617</guid>
  </item> 
  <item>
   <title>OData versus &#039;EntityState&#039; :   I&amp;#039;ve enabled OData as...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3445&amp;PID=13603#13603</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1456" rel="nofollow">TonyHansen</a><br /><strong>Subject:</strong> 3445<br /><strong>Posted:</strong> 18-May-2012 at 11:39pm<br /><br />I've enabled OData as described here:<div> </div><div><a href="http://drc.ideablade.com/xwiki/bin/view/&#068;ocumentati&#111;n/odata-enable" target="_blank">http://drc.ideablade.com/xwiki/bin/view/Documentation/odata-enable</a></div><div> </div><div>I've ended up with the cursed "An error occurred while processing this request." error.  I then Googled around until I found out how to turn on debugging, as per the instructions here:</div><div> </div><div><a href="http://blogs.msdn.com/b/phaniraj/archive/2008/06/18/debugging-ado-net-data-services.aspx" target="_blank">http://blogs.msdn.com/b/phaniraj/archive/2008/06/18/debugging-ado-net-data-services.aspx</a></div><div> </div><div>Now I'm seeing that the cause of the problem is an 'EntityState' property:</div><div> </div><div>&lt;SNIP&gt;</div><div>The server encountered an error processing the request. The exception message is 'The property 'EntityState' on type 'IdeaBlade.EntityModel.EntityAspect' is not a valid property. Make sure that the type of the property is a public type and a supported primitive type or a entity type with a valid key or a complex type.'. </div><div>&lt;/SNIP&gt;</div><div> </div><div>Doing a search over my code, I can't even find an 'EntityState' property, leading me to think this is an internal DevForce property.</div><div> </div><div>So ... what causes this, and how do I either fix it, or work around it?</div><div> </div><div>Environment is Visual Studio 11 Beta, .NET Framework 4 project, on Win7 Ultimate.</div><div> </div><div>Any assistance appreciated!</div><div> </div><div>T</div>]]>
   </description>
   <pubDate>Fri, 18 May 2012 23:39:04 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3445&amp;PID=13603#13603</guid>
  </item> 
 </channel>
</rss>