<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Vocabularies in WCF Data Services</title><link>http://blogs.msdn.com/b/astoriateam/archive/2011/10/13/vocabularies-in-wcf-data-services.aspx</link><description>Update (6/4/2012): This post is updated to reflect the few changes that were made to the vocabularies in OData v3 and the vocabularies feature in WCF Data Services 5.0. Please download the WCF Data Services 5.0 from the download center to follow along</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>re: Vocabularies in WCF Data Services</title><link>http://blogs.msdn.com/b/astoriateam/archive/2011/10/13/vocabularies-in-wcf-data-services.aspx#10314813</link><pubDate>Mon, 04 Jun 2012 18:53:40 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10314813</guid><dc:creator>Turker Keskinpala - MSFT</dc:creator><description>&lt;p&gt;@wvii, I apologize for the trouble. You correctly spotted some of the issues. I just updated the blog post to reflect some changes that were made in the 5.0 RTM release. Could you please try again with the updated code snippets and see if you still have the problem?&lt;/p&gt;
&lt;p&gt;Thank you.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10314813" width="1" height="1"&gt;</description></item><item><title>re: Vocabularies in WCF Data Services</title><link>http://blogs.msdn.com/b/astoriateam/archive/2011/10/13/vocabularies-in-wcf-data-services.aspx#10312029</link><pubDate>Wed, 30 May 2012 20:52:33 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10312029</guid><dc:creator>wvii</dc:creator><description>&lt;p&gt;I am having difficulties using the vocabular based on the samples above.&lt;/p&gt;
&lt;p&gt;I am pretty new at this but two things appear to be wrong.&lt;/p&gt;
&lt;p&gt;I believe:&lt;/p&gt;
&lt;p&gt;bool parsed = CsdlReader.TryParse(xmlreaders, out annotationsmodel, out errors, model);&lt;/p&gt;
&lt;p&gt;should be:&lt;/p&gt;
&lt;p&gt;bool parsed = CsdlReader.TryParse(xmlreaders, model, out annotationsmodel, out errors);&lt;/p&gt;
&lt;p&gt;bassed on: &lt;a rel="nofollow" target="_new" href="http://msdn.microsoft.com/en-us/library/hh919633(v=vs.103).aspx"&gt;msdn.microsoft.com/.../hh919633(v=vs.103).aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Also in the annotations file I believe there needs to be a Namespace in the Using and not a NamespaceUri:&lt;/p&gt;
&lt;p&gt;&amp;lt;Using NamespaceUri=&amp;quot;&lt;a rel="nofollow" target="_new" href="http://vocabularies.odata.org/Validation&amp;quot;"&gt;vocabularies.odata.org/Validation&amp;quot;&lt;/a&gt; Alias=&amp;quot;Validation&amp;quot;/&amp;gt;&lt;/p&gt;
&lt;p&gt;according to this:&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://msdn.microsoft.com/en-us/library/bb738545(v=vs.100).aspx"&gt;msdn.microsoft.com/.../bb738545(v=vs.100).aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Is there another example, possibly with code for downloading available?&lt;/p&gt;
&lt;p&gt;Thank you in advance.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10312029" width="1" height="1"&gt;</description></item><item><title>re: Vocabularies in WCF Data Services</title><link>http://blogs.msdn.com/b/astoriateam/archive/2011/10/13/vocabularies-in-wcf-data-services.aspx#10306957</link><pubDate>Fri, 18 May 2012 20:53:33 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10306957</guid><dc:creator>MolallaComm</dc:creator><description>&lt;p&gt;Hi Turker,&lt;/p&gt;
&lt;p&gt;Glad to hear that there is still progress being made on this - I look forward to your upcoming post. &amp;nbsp;I wish that you guys would make it just work end to end for people that are using entity framework and code first POCOs. &amp;nbsp;That is:&lt;/p&gt;
&lt;p&gt;I can put data annotation attributes in my POCOs on the server side and have them transparently flow thru to the client. &amp;nbsp;I don&amp;#39;t want to have to create/maintain a custom annotations file, I just want it to read the annotations from my code first POCOs, put that in the metadata, and then in the case of silverlight, have the Add/Update Service Reference code generator be smart enough to read the metadata and setup IDataErrorInfo style validation on the generated data objects I will use on the client side. &amp;nbsp;if you could do that, I think you&amp;#39;d make me and a lot of other people really happy! &amp;nbsp;You could do something similar on the clientside for Javascript that would read the metadata and produce validation logic for upshot or whatever toolkit was being used. &amp;nbsp;&lt;/p&gt;
&lt;p&gt;Just having to define validation logic in one place would be very nice.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10306957" width="1" height="1"&gt;</description></item><item><title>re: Vocabularies in WCF Data Services</title><link>http://blogs.msdn.com/b/astoriateam/archive/2011/10/13/vocabularies-in-wcf-data-services.aspx#10294841</link><pubDate>Wed, 18 Apr 2012 06:56:11 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10294841</guid><dc:creator>Turker Keskinpala - MSFT</dc:creator><description>&lt;p&gt;Hi Len,&lt;/p&gt;
&lt;p&gt;WCF Data Services currently do not support adding annotations into classes e.g a fluent api for annotations. As you mention currently the way achieve your scenario is writing a so called annotations file and configuring the service to pass your annotations on to the $metadata endpoint. &amp;nbsp;&lt;/p&gt;
&lt;p&gt;Your annotation example looks syntactically correct. It is hard to say if it semantically what you want without knowing your model and scenario. You seem to be annotating the City EntityType or ComplexType with the Title term from a vocabulary with the strong name Display and you are assigning a string value for the Title. Without knowing your scenario, if I were a client who understands the TItle term from your Display vocabulary, one way I could interpret the annotations is that, I should use the given string values for the types City, State and ZIP as Title instead of say using hte Name properties of those types.&lt;/p&gt;
&lt;p&gt;I realize the content is limited to blog posts right now and we are planning to publish a more detailed post on vocabularies soon. Please make sure you visit the forum (&lt;a rel="nofollow" target="_new" href="http://social.msdn.microsoft.com/Forums/en-US/adodotnetdataservices/threads"&gt;social.msdn.microsoft.com/.../threads&lt;/a&gt;) for questions and issues.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10294841" width="1" height="1"&gt;</description></item><item><title>re: Vocabularies in WCF Data Services</title><link>http://blogs.msdn.com/b/astoriateam/archive/2011/10/13/vocabularies-in-wcf-data-services.aspx#10292826</link><pubDate>Wed, 11 Apr 2012 20:07:30 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10292826</guid><dc:creator>LenChaney</dc:creator><description>&lt;p&gt;Also, my desire is for a simple description attached to each data element in the metadata. &amp;nbsp;Here is what I have found so far. &amp;nbsp;Is this correct?&lt;/p&gt;
&lt;p&gt;	&amp;lt;Annotations Target=&amp;quot;DataServiceSite.City&amp;quot;&amp;gt;&lt;/p&gt;
&lt;p&gt;		&amp;lt;ValueAnnotation Term=&amp;quot;Display.Title&amp;quot; String=&amp;quot;City in which the site is located&amp;quot;/&amp;gt;&lt;/p&gt;
&lt;p&gt;	&amp;lt;/Annotations&amp;gt;&lt;/p&gt;
&lt;p&gt;	&amp;lt;Annotations Target=&amp;quot;DataServiceSite.State&amp;quot;&amp;gt;&lt;/p&gt;
&lt;p&gt;		&amp;lt;ValueAnnotation Term=&amp;quot;Display.Title&amp;quot; String=&amp;quot;State in which the site is located&amp;quot;/&amp;gt;&lt;/p&gt;
&lt;p&gt;	&amp;lt;/Annotations&amp;gt;&lt;/p&gt;
&lt;p&gt;	&amp;lt;Annotations Target=&amp;quot;DataServiceSite.ZIP&amp;quot;&amp;gt;&lt;/p&gt;
&lt;p&gt;		&amp;lt;ValueAnnotation Term=&amp;quot;Display.Title&amp;quot; String=&amp;quot;ZIP code of the City&amp;quot;/&amp;gt;&lt;/p&gt;
&lt;p&gt;	&amp;lt;/Annotations&amp;gt;&lt;/p&gt;
&lt;p&gt;Does this look correct?&lt;/p&gt;
&lt;p&gt;I also want to document/annotate some enums. &amp;nbsp;My best guess is that I would use a validation vocubulary although I don&amp;#39;t want to validate but it does document to choices. &amp;nbsp;Can you show me how that would look?&lt;/p&gt;
&lt;p&gt;It appears that this is pretty new so there is not a lot of infor out there right now or at least I cannot find it. &amp;nbsp;Any help would be greatly appreciated.&lt;/p&gt;
&lt;p&gt;Sincerely,&lt;/p&gt;
&lt;p&gt;Len&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10292826" width="1" height="1"&gt;</description></item><item><title>re: Vocabularies in WCF Data Services</title><link>http://blogs.msdn.com/b/astoriateam/archive/2011/10/13/vocabularies-in-wcf-data-services.aspx#10292825</link><pubDate>Wed, 11 Apr 2012 20:06:43 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10292825</guid><dc:creator>LenChaney</dc:creator><description>&lt;p&gt;I have been looking around for information on how to document or annotate the oData metadata. &amp;nbsp;Rather than sending each user a list of the fields and descriptions, I&amp;#39;d like it to appear in the metadata. &amp;nbsp;That might not be what they are looking for but it is getting there and is readable.&lt;/p&gt;
&lt;p&gt;From this article, it looks like the best we can do right now is to have the WCF service include a static XML file containing the annotations and that is sufficient although not the best solution going forward. &amp;nbsp;&lt;/p&gt;
&lt;p&gt;We do not use the EDM designer but rather our own classes using iQueryable and DataServiceXXXX. &amp;nbsp;Is there a way we can code annotations into the classes?&lt;/p&gt;
&lt;p&gt;Sincerely,&lt;/p&gt;
&lt;p&gt;Len&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10292825" width="1" height="1"&gt;</description></item><item><title>re: Vocabularies in WCF Data Services</title><link>http://blogs.msdn.com/b/astoriateam/archive/2011/10/13/vocabularies-in-wcf-data-services.aspx#10246955</link><pubDate>Mon, 12 Dec 2011 23:48:59 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10246955</guid><dc:creator>Turker</dc:creator><description>&lt;p&gt;Vaccanoll, I apologize for the very late reply on this thread. Thank you very much for your early feedback.&lt;/p&gt;
&lt;p&gt;I hear you on the feedback for the client side. We are focusing on the usability and completeness of it at the moment. AnnotationsBuilder was intended to give the flexibility to the user as to how to store and load the annotations.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10246955" width="1" height="1"&gt;</description></item><item><title>re: Vocabularies in WCF Data Services</title><link>http://blogs.msdn.com/b/astoriateam/archive/2011/10/13/vocabularies-in-wcf-data-services.aspx#10239289</link><pubDate>Mon, 21 Nov 2011 22:48:28 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10239289</guid><dc:creator>Vaccanoll</dc:creator><description>&lt;p&gt;&amp;gt;&amp;gt;As always, we are very interested in hearing your thoughts and feedback. &lt;/p&gt;
&lt;p&gt;An occasional, &amp;quot;Thanks for your feedback&amp;quot; on some of your posts would make this more believable.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10239289" width="1" height="1"&gt;</description></item><item><title>re: Vocabularies in WCF Data Services</title><link>http://blogs.msdn.com/b/astoriateam/archive/2011/10/13/vocabularies-in-wcf-data-services.aspx#10238890</link><pubDate>Sun, 20 Nov 2011 10:11:15 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10238890</guid><dc:creator>maybe a better integration System.ComponentModel.DataAnnotations Namespace would be better?</dc:creator><description>&lt;p&gt;any comments on why not using System.ComponentModel.DataAnnotations Namespace? thx&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10238890" width="1" height="1"&gt;</description></item><item><title>re: Vocabularies in WCF Data Services</title><link>http://blogs.msdn.com/b/astoriateam/archive/2011/10/13/vocabularies-in-wcf-data-services.aspx#10225347</link><pubDate>Fri, 14 Oct 2011 15:23:42 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10225347</guid><dc:creator>Vaccanoll</dc:creator><description>&lt;p&gt;In retrospect, I can see how adding it to the business class could cause massive problems for some client side apps. &amp;nbsp;It may not be a good suggestion.&lt;/p&gt;
&lt;p&gt;However, I still think that my point about automatically creating validation objects when the client side classes are made is a good one. &amp;nbsp;(Just maybe not on the actual business class.)&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10225347" width="1" height="1"&gt;</description></item></channel></rss>