<?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 and Cocktail?</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : Community Forum : OData and Cocktail?</description>
  <pubDate>Tue, 14 Apr 2026 07:35:25 -700</pubDate>
  <lastBuildDate>Thu, 09 Aug 2012 09:19:51 -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=3571</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 and Cocktail? : One thing we can do to counter...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3571&amp;PID=14162#14162</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1005" rel="nofollow">mgood</a><br /><strong>Subject:</strong> 3571<br /><strong>Posted:</strong> 09-Aug-2012 at 9:19am<br /><br />One thing we can do to counter that is to make the property obsolete and hide it from IntelliSense. This way you get warnings if somebody does use it.<div><br></div><div><pre style="font-family: C&#111;nsolas; font-size: 13px; : white; -: initial initial; -repeat: initial initial; ">&nbsp;&nbsp;&nbsp;&nbsp;&#091;<span style="color:#2b91af;">ProvideEntityAspect</span>&#093;&nbsp;&nbsp;&nbsp;&nbsp;&#091;<span style="color:#2b91af;">DataContract</span>(IsReference&nbsp;=&nbsp;<span style="color:blue;">true</span>)&#093;&nbsp;&nbsp;&nbsp;&nbsp;&#091;<span style="color:#2b91af;">RequiresAuthentication</span>&#093;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color:blue;">public</span>&nbsp;<span style="color:blue;">abstract</span>&nbsp;<span style="color:blue;">class</span>&nbsp;<span style="color:#2b91af;">EntityBase</span>&nbsp;:&nbsp;<span style="color:#2b91af;">IEntity</span>&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color:blue;">private</span>&nbsp;<span style="color:#2b91af;">EntityFacts</span>&nbsp;_entityFacts; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#091;<span style="color:#2b91af;">NotMapped</span>&#093;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color:blue;">public</span>&nbsp;<span style="color:#2b91af;">EntityFacts</span>&nbsp;EntityFacts&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color:blue;">get</span>&nbsp;{&nbsp;<span style="color:blue;">return</span>&nbsp;_entityFacts&nbsp;??&nbsp;(_entityFacts&nbsp;=&nbsp;<span style="color:blue;">new</span>&nbsp;<span style="color:#2b91af;">EntityFacts</span>(<span style="color:blue;">this</span>));&nbsp;}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#091;<span style="color:#2b91af;">DataMember</span>&#093;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#091;<span style="color:#2b91af;">ConcurrencyCheck</span>&#093;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#091;<span style="color:#2b91af;">ConcurrencyStrategy</span>(<span style="color:#2b91af;">ConcurrencyStrategy</span>.AutoIncrement)&#093;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color:blue;">public</span>&nbsp;<span style="color:blue;">int</span>&nbsp;RowVersion&nbsp;{&nbsp;<span style="color:blue;">get</span>;&nbsp;<span style="color:blue;">internal</span>&nbsp;<span style="color:blue;">set</span>;&nbsp;} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color:blue;">public</span>&nbsp;<span style="color:blue;">virtual</span>&nbsp;<span style="color:blue;">void</span>&nbsp;Validate(<span style="color:#2b91af;">VerifierResultCollection</span>&nbsp;validationErrors)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#091;<span style="color:#2b91af;">BeforeSet</span>&#093;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color:blue;">internal</span>&nbsp;<span style="color:blue;">void</span>&nbsp;RemoveWhiteSpace(<span style="color:#2b91af;">IEntityPropertySetInterceptorArgs</span>&nbsp;args)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color:blue;">if</span>&nbsp;(args.EntityProperty.DataType&nbsp;!=&nbsp;<span style="color:blue;">typeof</span>(<span style="color:blue;">string</span>))&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color:blue;">return</span>; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;args.Value&nbsp;=&nbsp;((<span style="color:blue;">string</span>)&nbsp;args.Value).Trim();&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#091;<span style="color:#2b91af;">Obsolete</span>(<span style="color:#a31515;">"DO&nbsp;NOT&nbsp;USE&nbsp;EntityAspect&nbsp;directly.&nbsp;Use&nbsp;EntityFacts&nbsp;instead."</span>)&#093;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#091;<span style="color:#2b91af;">EditorBrowsable</span>(<span style="color:#2b91af;">EditorBrowsableState</span>.Never)&#093;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color:blue;">public</span>&nbsp;<span style="color:#2b91af;">EntityAspect</span>&nbsp;EntityAspect&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color:blue;">get</span>&nbsp;{&nbsp;<span style="color:blue;">return</span>&nbsp;<span style="color:blue;">null</span>;&nbsp;}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;&nbsp;&nbsp;}</pre></div>]]>
   </description>
   <pubDate>Thu, 09 Aug 2012 09:19:51 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3571&amp;PID=14162#14162</guid>
  </item> 
  <item>
   <title>OData and Cocktail? :   Excellent!!This works.Too...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3571&amp;PID=14161#14161</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1498" rel="nofollow">pmolijn</a><br /><strong>Subject:</strong> 3571<br /><strong>Posted:</strong> 09-Aug-2012 at 6:55am<br /><br />Excellent!!<div>This works.</div><div>&nbsp;</div><div>Too bad we have to expose the EntityAspect.</div><div>&nbsp;</div><div>Thanks Marcel</div>]]>
   </description>
   <pubDate>Thu, 09 Aug 2012 06:55:33 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3571&amp;PID=14161#14161</guid>
  </item> 
  <item>
   <title>OData and Cocktail? :   Looks like the WCF Data Service...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3571&amp;PID=14158#14158</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1005" rel="nofollow">mgood</a><br /><strong>Subject:</strong> 3571<br /><strong>Posted:</strong> 08-Aug-2012 at 8:11pm<br /><br />Looks like the WCF Data Service struggles with the implicit implementation of EntityAspect. The only way around it I found so far is to explicity implement EntityAspect. Unfortunately, TempHire very deliberately hides EntityAspect. It gives the consumer of the entity way too much power. Looks like in order to use Code-First and OData together, the EntityAspect has to be exposed. Sigh!<div></div><div>&nbsp;</div><div><pre style=": white; color: black; font-family: C&#111;nsolas;">&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: blue;">public</span>&nbsp;<span style="color: blue;">abstract</span>&nbsp;<span style="color: blue;">class</span>&nbsp;<span style="color: rgb43, 145, 175;">EntityBase</span>&nbsp;:&nbsp;<span style="color: rgb43, 145, 175;">IEntity</span>&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: blue;">private</span>&nbsp;<span style="color: rgb43, 145, 175;">EntityFacts</span>&nbsp;_entityFacts; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#091;<span style="color: rgb43, 145, 175;">NotMapped</span>&#093;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: blue;">public</span>&nbsp;<span style="color: rgb43, 145, 175;">EntityFacts</span>&nbsp;EntityFacts&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: blue;">get</span>&nbsp;{&nbsp;<span style="color: blue;">return</span>&nbsp;_entityFacts&nbsp;??&nbsp;(_entityFacts&nbsp;=&nbsp;<span style="color: blue;">new</span>&nbsp;<span style="color: rgb43, 145, 175;">EntityFacts</span>(<span style="color: blue;">this</span>));&nbsp;}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#091;<span style="color: rgb43, 145, 175;">DataMember</span>&#093;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#091;<span style="color: rgb43, 145, 175;">ConcurrencyCheck</span>&#093;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#091;<span style="color: rgb43, 145, 175;">ConcurrencyStrategy</span>(<span style="color: rgb43, 145, 175;">ConcurrencyStrategy</span>.AutoIncrement)&#093;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: blue;">public</span>&nbsp;<span style="color: blue;">int</span>&nbsp;RowVersion&nbsp;{&nbsp;<span style="color: blue;">get</span>;&nbsp;<span style="color: blue;">internal</span>&nbsp;<span style="color: blue;">set</span>;&nbsp;} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: blue;">public</span>&nbsp;<span style="color: blue;">virtual</span>&nbsp;<span style="color: blue;">void</span>&nbsp;Validate(<span style="color: rgb43, 145, 175;">VerifierResultCollection</span>&nbsp;validationErrors)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: blue;">public</span>&nbsp;<span style="color: rgb43, 145, 175;">EntityAspect</span>&nbsp;EntityAspect&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: blue;">get</span>&nbsp;{&nbsp;<span style="color: blue;">return</span>&nbsp;<span style="color: blue;">null</span>;&nbsp;}&nbsp;&nbsp;<span style="color: green;">//&nbsp;PostSharp&nbsp;will&nbsp;replace&nbsp;body</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;&nbsp;&nbsp;}</pre></div><div>&nbsp;</div>]]>
   </description>
   <pubDate>Wed, 08 Aug 2012 20:11:53 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3571&amp;PID=14158#14158</guid>
  </item> 
  <item>
   <title>OData and Cocktail? :   Thanks Marcel and sorry for...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3571&amp;PID=14157#14157</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1498" rel="nofollow">pmolijn</a><br /><strong>Subject:</strong> 3571<br /><strong>Posted:</strong> 08-Aug-2012 at 5:32pm<br /><br />Thanks Marcel and sorry for calling you Michael.<div>&nbsp;</div><div>Applied the <font size="2"><font face="C&#111;nsolas"><font color="#2b91af">&#091;IgnoreProperties</font>(<font color="#a31515"><font color="#a31515"><font color="#a31515">@"EntityFacts", @"EntityAspect", @"AAA_EntityAspectForSerialization"</font></font></font>)&#093;</font></font></div><div><font size="2" face="C&#111;nsolas"></font>&nbsp;</div><div><font size="2" face="C&#111;nsolas">And now it's complaining that it does not have a property of EntityAspect after all for the DomainModel.Address ?????</font></div><div><font size="2" face="C&#111;nsolas"></font>&nbsp;</div><div><font size="2" face="C&#111;nsolas"></font>&nbsp;</div><div>The server encountered an error processing the request. The exception message is 'The property 'EntityAspect' is not a valid property name for type 'DomainModel.Address'. Please specify a valid property name.'.</div><div>&nbsp;</div><div>It sounded soo simple. Decorate the entity with IgnoreProperties and Dataservicekey and it should work.</div><div>&nbsp;</div><div>Just for the record.</div><div>This is what I have now:</div><div>&nbsp;</div><div>namespace DomainModel<br>{<br>&nbsp;&nbsp;&nbsp; &#091;IgnoreProperties(@"EntityFacts", @"EntityAspect", @"AAAA_EntityAspectForSerialization")&#093;<br>&nbsp;&nbsp;&nbsp; &#091;DataServiceKey(@"Id")&#093;<br>&nbsp;&nbsp;&nbsp; public partial class Address<br>&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; }<br>}</div><div>&nbsp;</div><p><font size="2" face="C&#111;nsolas">namespace DomainModel<br>{<br>&nbsp;&nbsp;&nbsp; &#091;DataContract(IsReference = true)&#093;<br>&nbsp;&nbsp;&nbsp; &#091;ProvideEntityAspect&#093;<br>&nbsp;&nbsp;&nbsp; &#091;RequiresAuthentication&#093;</font><p><font size="2" face="C&#111;nsolas">&nbsp;&nbsp;&nbsp; public abstract class EntityBase<br>&nbsp;&nbsp;&nbsp; {<br>&nbsp;//&nbsp; content not altered. TempHire sample class<br>&nbsp;&nbsp;&nbsp; }<br>}<p></font>&nbsp;</p>]]>
   </description>
   <pubDate>Wed, 08 Aug 2012 17:32:18 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3571&amp;PID=14157#14157</guid>
  </item> 
  <item>
   <title>OData and Cocktail? : Don&amp;#039;t get rid of the properties...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3571&amp;PID=14156#14156</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1005" rel="nofollow">mgood</a><br /><strong>Subject:</strong> 3571<br /><strong>Posted:</strong> 08-Aug-2012 at 1:58pm<br /><br />Don't get rid of the properties you were already ignoring according to your original post. I said ADD EntityFacts to the ignore list, not replace the entire list with just EntityFacts. You still need to ignore the two properties you already had. <DIV>&nbsp;</DIV><DIV><DIV><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas>&#091;IgnoreProperties</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>(</FONT></FONT><FONT color=#a31515 size=2 face=C&#111;nsolas><FONT color=#a31515 size=2 face=C&#111;nsolas><FONT color=#a31515 size=2 face=C&#111;nsolas>@"EntityFacts", @"EntityAspect", @"AAA_EntityAspectForSerialization"</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>)&#093;</DIV><DIV></DIV><DIV></FONT></FONT></DIV></DIV><DIV>If it bombs on other properties just keep adding to the ignore list. OData should ignore anything other than your data properties.</DIV><DIV>&nbsp;</DIV><DIV>BTW, my name is Marcel not Michael :-)</DIV>]]>
   </description>
   <pubDate>Wed, 08 Aug 2012 13:58:53 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3571&amp;PID=14156#14156</guid>
  </item> 
  <item>
   <title>OData and Cocktail? :   Addedto the EntityBase class,...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3571&amp;PID=14155#14155</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1498" rel="nofollow">pmolijn</a><br /><strong>Subject:</strong> 3571<br /><strong>Posted:</strong> 08-Aug-2012 at 1:50pm<br /><br />Added<div></div><p><font color="#2b91af" size="2" face="C&#111;nsolas"><font color="#2b91af" size="2" face="C&#111;nsolas"><font color="#2b91af" size="2" face="C&#111;nsolas">&#091;IgnoreProperties</font></font></font><font size="2" face="C&#111;nsolas"><font size="2" face="C&#111;nsolas">(</font></font><font color="#a31515" size="2" face="C&#111;nsolas"><font color="#a31515" size="2" face="C&#111;nsolas"><font color="#a31515" size="2" face="C&#111;nsolas">@"EntityFacts"</font></font></font><font size="2" face="C&#111;nsolas"><font size="2" face="C&#111;nsolas">)&#093;</p><div></div><div></font></font><font size="2" face="C&#111;nsolas"><font size="2" face="C&#111;nsolas">to the EntityBase class, </font></font></div><div>&nbsp;</div><div>But now I'm getting:<br>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>]]>
   </description>
   <pubDate>Wed, 08 Aug 2012 13:50:23 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3571&amp;PID=14155#14155</guid>
  </item> 
  <item>
   <title>OData and Cocktail? :   Thanks Michael!This is what...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3571&amp;PID=14154#14154</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1498" rel="nofollow">pmolijn</a><br /><strong>Subject:</strong> 3571<br /><strong>Posted:</strong> 08-Aug-2012 at 1:38pm<br /><br />Thanks Michael!<div>&nbsp;</div><div>This is what my question should be;</div><div>How to make the TempHire domain model work with OData for my iOS (iPhone/iPad) app consumption?</div>]]>
   </description>
   <pubDate>Wed, 08 Aug 2012 13:38:31 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3571&amp;PID=14154#14154</guid>
  </item> 
  <item>
   <title>OData and Cocktail? : First off, OData is a way to make...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3571&amp;PID=14151#14151</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1005" rel="nofollow">mgood</a><br /><strong>Subject:</strong> 3571<br /><strong>Posted:</strong> 08-Aug-2012 at 11:27am<br /><br />First off, OData is a way to make your server-side domain model available to a non .NET client. There wouldn't be any Cocktail in play. DO NOT USE Cocktail on the server! Cocktail is a client framework. It doesn't work on the server as-is. You will get threading and composition issues.<DIV>&nbsp;</DIV><DIV>Having said that, you can certainly make any domain model used by a Cocktail client available via OData for other clients. To make the TempHire domain model work with OData, you need to add EntityFacts to the ignored properties list. EntityFacts is a&nbsp;wrapper property that provides "safe" access to EntityAspect and just like EntityAspect, it needs to be ignored by OData.</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Wed, 08 Aug 2012 11:27:11 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3571&amp;PID=14151#14151</guid>
  </item> 
  <item>
   <title>OData and Cocktail? :   Got a bit further.Instead...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3571&amp;PID=14150#14150</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1498" rel="nofollow">pmolijn</a><br /><strong>Subject:</strong> 3571<br /><strong>Posted:</strong> 08-Aug-2012 at 10:11am<br /><br />Got a bit further.<div>Instead of&nbsp;<font color="#2b91af"> public class ODataService : DataService&lt; EntityManagerProvider&lt;TempHireEntities&gt; &gt;</font></div><div><font color="#2b91af"><font><font color="#000000">I used</font></font>:&nbsp; public class ODataService : DataService&lt; TempHireEntities&gt; </font></div><div><font color="#2b91af"></font>&nbsp;</div><div>At runtime complained about a constructor missing. Added TempHireEntities() {} constructor.</div><div>Now stuck at following error:</div><div>&nbsp;</div><div>The server encountered an error processing the request. The exception message is 'The property 'EntityState' on type 'DomainModel.EntityFacts' 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>&nbsp;</div>]]>
   </description>
   <pubDate>Wed, 08 Aug 2012 10:11:57 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3571&amp;PID=14150#14150</guid>
  </item> 
  <item>
   <title>OData and Cocktail? : I&amp;#039;m trying to get my head...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3571&amp;PID=14149#14149</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1498" rel="nofollow">pmolijn</a><br /><strong>Subject:</strong> 3571<br /><strong>Posted:</strong> 08-Aug-2012 at 9:15am<br /><br /><p><font size="2" face="C&#111;nsolas"><font size="2" face="C&#111;nsolas">I'm trying to get my head around the caliburn/cocktail framework in regards with OData<div></div>I did the following:<div></div><p><font color="#2b91af" size="2" face="C&#111;nsolas"><font color="#2b91af" size="2" face="C&#111;nsolas"><font color="#2b91af" size="2" face="C&#111;nsolas"><font>&nbsp;&nbsp;&nbsp; public class ODataService : DataService&lt; EntityManagerProvider&lt;TempHireEntities&gt; &gt;<br>&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // This method is called only once to initialize service-wide policies.<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public static void InitializeService(DataServiceConfiguration config)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; config.SetEntitySetAccessRule("Addresses", EntitySetRights.All);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; config.DataServiceBehavior.MaxProtocolVersion = DataServiceProtocolVersion.V2;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; }</font><div><font></font></div><p><font>Address entity is decorated as follows:</font><div><font>&nbsp;&nbsp;&nbsp; &#091;System.Data.Services.IgnoreProperties(@"EntityAspect", @"AAAA_EntityAspectForSerialization")&#093;<br>#if !SILVERLIGHT<br>&nbsp;&nbsp;&nbsp; &#091;System.Data.Services.Common.DataServiceKey(@"Id")&#093;<br>#endif</font></div><div><font>&nbsp;&nbsp;&nbsp; public partial class Address : AuditEntityBase, IHasRoot<br>&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // ... body of class untouched from sample<br>&nbsp;&nbsp;&nbsp;&nbsp; }</font></font></font></font><font size="2" face="C&#111;nsolas"><font size="2" face="C&#111;nsolas">The call at config.SetEntityAccessRule("Addresses", EntitySetRights.All) fails with an ArgumentException.<br>The given name 'Addresses' was not found in the entity sets.<br>Parameter name: name</font></font></font></font></div><div>What am I doing wrong here?</div><div>Thanks for any answers!</div><div>&nbsp;</div><div>Regards,<br>Patrick</div>]]>
   </description>
   <pubDate>Wed, 08 Aug 2012 09:15:01 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3571&amp;PID=14149#14149</guid>
  </item> 
 </channel>
</rss>