SilverlightShow: WCF RIA Services Part 5 - Metadata and Shared Classes Comments http://www.silverlightshow.net/ Silverlight articles, Silverlight tutorials, Silverlight videos, Silverlight samples SilverlightShow.net http://www.rssboard.org/rss-specification Argotic Syndication Framework 2008.0.2.0, http://www.codeplex.com/Argotic en-US estoychev@completit.com (Emil Stoychev) Re: WCF RIA Services Part 5 - Metadata and Shared Classes <p>I can't repro what you are describing with the sample code. When you select a Task and add a time entry, it is added to the selected task, and you can inspect the handling code in the view model and see that is the case. Selecting a different task and the time entry is no longer shown because it is not part of that task, go back to the one you added it to and it shows up. Its working as designed for me.</p> http://www.silverlightshow.net/items/WCF-RIA-Services-Part-5-Metadata-and-Shared-Classes.aspx#comment8424 brian.noyes http://www.silverlightshow.net/items/WCF-RIA-Services-Part-5-Metadata-and-Shared-Classes.aspx Sun, 02 Sep 2012 15:51:38 GMT Re: WCF RIA Services Part 5 - Metadata and Shared Classes <p>Thanks for these nice series on WCF RIA Services.</p> <p>When adding a Time Entry, it's always added to the first Task in grid even thought I select another Task and try to add a Time Entry, it's added to the first one. Any idea how I can fix this problem?</p> <p>Thanks for your time. </p> http://www.silverlightshow.net/items/WCF-RIA-Services-Part-5-Metadata-and-Shared-Classes.aspx#comment8401 JavidBahramzy http://www.silverlightshow.net/items/WCF-RIA-Services-Part-5-Metadata-and-Shared-Classes.aspx Tue, 21 Aug 2012 17:49:51 GMT Re: WCF RIA Services Part 5 - Metadata and Shared Classes <p>Nice, but I am having a bit of trouble here. I am not using EF, I am using LINQ2SQL. Not there is no include method as you explained.</p> <pre class="alt"><span id="lnum1" class="lnum"> </span><span class="kwrd">public</span> IQueryable<Task> GetTasks()</pre> <pre class="alteven"><span id="lnum2" class="lnum"> </span>{</pre> <pre class="alt"><span id="lnum3" class="lnum"> </span> <span class="kwrd">return</span> <span class="kwrd">this</span>.ObjectContext.Tasks.<strong>Include</strong>(<span class="str">"TimeEntries"</span>).OrderBy(t=> t.StartDate);</pre> <pre class="alteven"><span id="lnum4" class="lnum"> </span>}</pre>  I would believe Linq2Sql uses a LoadWith(), but that is not there either. Any help?<br /> http://www.silverlightshow.net/items/WCF-RIA-Services-Part-5-Metadata-and-Shared-Classes.aspx#comment7458 HoudiniSutherland http://www.silverlightshow.net/items/WCF-RIA-Services-Part-5-Metadata-and-Shared-Classes.aspx Sun, 29 Jan 2012 23:13:36 GMT Re: WCF RIA Services Part 5 - Metadata and Shared Classes <p>Its been a while since I have done L2S - thought it eager loaded by default. But unfortunately can't coach you on how to get data loaded with L2S here since I don't use it. Bottom line, if you can confirm the data access pattern with L2S that would get the data loaded on the server if you were to loop over the IQueryable<T> then it will work from there like EF. The other thing I am not sure of is if the L2S entities include the right attributes (i.e. Association attribute) to make sure things get transfered properly.</p> http://www.silverlightshow.net/items/WCF-RIA-Services-Part-5-Metadata-and-Shared-Classes.aspx#comment7457 brian.noyes http://www.silverlightshow.net/items/WCF-RIA-Services-Part-5-Metadata-and-Shared-Classes.aspx Sun, 29 Jan 2012 23:10:15 GMT Re: WCF RIA Services Part 5 - Metadata and Shared Classes <p>Nice, but I am having a bit of trouble here. I am not using EF, I am using LINQ2SQL. Not there is no include method as you explained.</p> <pre class="alt"><span id="lnum1" class="lnum"> </span><span class="kwrd">public</span> IQueryable<Task> GetTasks()</pre> <pre class="alteven"><span id="lnum2" class="lnum"> </span>{</pre> <pre class="alt"><span id="lnum3" class="lnum"> </span> <span class="kwrd">return</span> <span class="kwrd">this</span>.ObjectContext.Tasks.<strong>Include</strong>(<span class="str">"TimeEntries"</span>).OrderBy(t=> t.StartDate);</pre> <pre class="alteven"><span id="lnum4" class="lnum"> </span>}</pre>  I would believe Linq2Sql uses a LoadWith(), but that is not there either. Any help?<br /> http://www.silverlightshow.net/items/WCF-RIA-Services-Part-5-Metadata-and-Shared-Classes.aspx#comment7456 HoudiniSutherland http://www.silverlightshow.net/items/WCF-RIA-Services-Part-5-Metadata-and-Shared-Classes.aspx Sun, 29 Jan 2012 21:26:15 GMT Re: WCF RIA Services Part 5 - Metadata and Shared Classes <p>Nice, but I am having a bit of trouble here. I am not using EF, I am using LINQ2SQL. Not there is no include method as you explained.</p> <pre class="alt"><span id="lnum1" class="lnum"> </span><span class="kwrd">public</span> IQueryable<Task> GetTasks()</pre> <pre class="alteven"><span id="lnum2" class="lnum"> </span>{</pre> <pre class="alt"><span id="lnum3" class="lnum"> </span> <span class="kwrd">return</span> <span class="kwrd">this</span>.ObjectContext.Tasks.<strong>Include</strong>(<span class="str">"TimeEntries"</span>).OrderBy(t=> t.StartDate);</pre> <pre class="alteven"><span id="lnum4" class="lnum"> </span>}</pre>  I would believe Linq2Sql uses a LoadWith(), but that is not there either. Any help?<br /> http://www.silverlightshow.net/items/WCF-RIA-Services-Part-5-Metadata-and-Shared-Classes.aspx#comment7455 HoudiniSutherland http://www.silverlightshow.net/items/WCF-RIA-Services-Part-5-Metadata-and-Shared-Classes.aspx Sun, 29 Jan 2012 21:03:10 GMT Re: WCF RIA Services Part 5 - Metadata and Shared Classes Benoit73, that is fixed in the source code for the next article I believe. Demo-ware, not intended to have every function working. http://www.silverlightshow.net/items/WCF-RIA-Services-Part-5-Metadata-and-Shared-Classes.aspx#comment6670 brian.noyes http://www.silverlightshow.net/items/WCF-RIA-Services-Part-5-Metadata-and-Shared-Classes.aspx Tue, 18 Oct 2011 14:40:48 GMT Re: WCF RIA Services Part 5 - Metadata and Shared Classes The OKbutton event was not associated and the delete time entries does not delete the selected one. There is nothing in the method. http://www.silverlightshow.net/items/WCF-RIA-Services-Part-5-Metadata-and-Shared-Classes.aspx#comment6649 Benoit73 http://www.silverlightshow.net/items/WCF-RIA-Services-Part-5-Metadata-and-Shared-Classes.aspx Fri, 14 Oct 2011 01:24:01 GMT Re: WCF RIA Services Part 5 - Metadata and Shared Classes good http://www.silverlightshow.net/items/WCF-RIA-Services-Part-5-Metadata-and-Shared-Classes.aspx#comment6448 Oged http://www.silverlightshow.net/items/WCF-RIA-Services-Part-5-Metadata-and-Shared-Classes.aspx Tue, 23 Aug 2011 10:43:31 GMT RE: WCF RIA Services Part 5 - Metadata and Shared Classes <p>Oh, and I should also mention that with SP1 (which is installed with VS 2010 SP1), there is an improvement in the way the classes get generated from a single domain service project so that multiple domain services can expose the same entity type. </p> <p>But if you have links to the server projects in a client project, that project should have generated types for the domain context, entity types, and any .shared. classes.</p> http://www.silverlightshow.net/items/WCF-RIA-Services-Part-5-Metadata-and-Shared-Classes.aspx#comment6236 Brian Noyes http://www.silverlightshow.net/items/WCF-RIA-Services-Part-5-Metadata-and-Shared-Classes.aspx Mon, 30 May 2011 15:02:00 GMT RE: WCF RIA Services Part 5 - Metadata and Shared Classes <p>Hi Teun,</p> <p>You can control which server project a client points to through the WCF RIA Services Link setting in the Silverlight project. But you always have to have a 1:1 relationship there. See part 9 about structuring projects to get better idea of how all that works. </p> http://www.silverlightshow.net/items/WCF-RIA-Services-Part-5-Metadata-and-Shared-Classes.aspx#comment6235 Brian Noyes http://www.silverlightshow.net/items/WCF-RIA-Services-Part-5-Metadata-and-Shared-Classes.aspx Mon, 30 May 2011 14:59:58 GMT RE: WCF RIA Services Part 5 - Metadata and Shared Classes <p>Hi Brian,</p> <p>is it possible to control in which projects shared classes are generated? </p> <p>Because I have one project for the data classes and it is used in several ria service projects. But in some services not all classes are used/generated. This means that in some services I have the shared validation classes are generated and not the data class so I get a compile errors in the generated code <span style="color: blue;">(for example:  var</span> user = context.ObjectInstance <span style="color: blue;">as</span> <span style="color: #2b91af;">User</span>). </p> <p></p> <p></p> http://www.silverlightshow.net/items/WCF-RIA-Services-Part-5-Metadata-and-Shared-Classes.aspx#comment6234 Teun http://www.silverlightshow.net/items/WCF-RIA-Services-Part-5-Metadata-and-Shared-Classes.aspx Mon, 30 May 2011 14:56:51 GMT RE: WCF RIA Services Part 5 - Metadata and Shared Classes <p>Your entities will only show up if a) they are Entity Framework generated entities as part of a Entity Data Model, and b) that model is either in your domain service project or a referenced assembly. You do have to build before they will show up too.</p> <p>There is no magic to the wizard with respect to the metadata class, you can create the same setup with Add New Class, define a partial type for your entity type, put the MetadataType attribute on it to point to the metadata class, and then define the properties you want to add attributes to on the metadata class.</p> http://www.silverlightshow.net/items/WCF-RIA-Services-Part-5-Metadata-and-Shared-Classes.aspx#comment6195 Brian Noyes http://www.silverlightshow.net/items/WCF-RIA-Services-Part-5-Metadata-and-Shared-Classes.aspx Tue, 24 May 2011 19:31:55 GMT RE: WCF RIA Services Part 5 - Metadata and Shared Classes <p>Great article. How does one generate the .meta.cs file without using the checkbox?  I have an issue where none of my entities show up in the dialog.</p> http://www.silverlightshow.net/items/WCF-RIA-Services-Part-5-Metadata-and-Shared-Classes.aspx#comment6194 Subt13 http://www.silverlightshow.net/items/WCF-RIA-Services-Part-5-Metadata-and-Shared-Classes.aspx Tue, 24 May 2011 19:26:09 GMT RE: WCF RIA Services Part 5 - Metadata and Shared Classes Great article.  Thanks. http://www.silverlightshow.net/items/WCF-RIA-Services-Part-5-Metadata-and-Shared-Classes.aspx#comment6167 Myles Johnson http://www.silverlightshow.net/items/WCF-RIA-Services-Part-5-Metadata-and-Shared-Classes.aspx Thu, 19 May 2011 16:57:11 GMT RE: WCF RIA Services Part 5 - Metadata and Shared Classes <p>Very concise, extremely helpful.  Thanks.  </p> http://www.silverlightshow.net/items/WCF-RIA-Services-Part-5-Metadata-and-Shared-Classes.aspx#comment6034 Femi Oyekan http://www.silverlightshow.net/items/WCF-RIA-Services-Part-5-Metadata-and-Shared-Classes.aspx Mon, 02 May 2011 03:21:28 GMT RE: WCF RIA Services Part 5 - Metadata and Shared Classes <p>Hi Jason, (and for the benefit of anyone else with the same question)</p> <p>System.Windows.Interactivity and Microsoft.Expression.Interaction libraries are part of the Expression Blend SDK, which is a freely downloadable and distributable library even if you don't have Blend. It includes a number of built in behaviors from Blend as well as the base classes to build your own and the attached properties to attach those behaviors to your elements in XAML.</p> http://www.silverlightshow.net/items/WCF-RIA-Services-Part-5-Metadata-and-Shared-Classes.aspx#comment5942 Brian Noyes http://www.silverlightshow.net/items/WCF-RIA-Services-Part-5-Metadata-and-Shared-Classes.aspx Wed, 20 Apr 2011 13:56:42 GMT RE: WCF RIA Services Part 5 - Metadata and Shared Classes <p>hi mentor,</p> <p> the namespace looks like <span style="font-family: consolas; font-size: 13px;">System.Windows.Interactivity that isn't find out from your sample. Could you give me some guildlines to solve this issue. Thanks a lot!</span></p> <p> </p>   <p> </p> http://www.silverlightshow.net/items/WCF-RIA-Services-Part-5-Metadata-and-Shared-Classes.aspx#comment5938 Jason Wang http://www.silverlightshow.net/items/WCF-RIA-Services-Part-5-Metadata-and-Shared-Classes.aspx Wed, 20 Apr 2011 09:05:04 GMT RE: WCF RIA Services Part 5 - Metadata and Shared Classes Really helpful post.. http://www.silverlightshow.net/items/WCF-RIA-Services-Part-5-Metadata-and-Shared-Classes.aspx#comment5183 nikunj http://www.silverlightshow.net/items/WCF-RIA-Services-Part-5-Metadata-and-Shared-Classes.aspx Thu, 30 Dec 2010 06:41:36 GMT RE: WCF RIA Services Part 5 - Metadata and Shared Classes do you have the instuction book I can print out since I lost mine to the Ria studiotrack 4 model no.R504 I cannot get it to work properly. I would appriciate it or if you know where I Can find it. so I may print it ou. thank you. terry http://www.silverlightshow.net/items/WCF-RIA-Services-Part-5-Metadata-and-Shared-Classes.aspx#comment5171 terry.bayles@att.net http://www.silverlightshow.net/items/WCF-RIA-Services-Part-5-Metadata-and-Shared-Classes.aspx Mon, 27 Dec 2010 22:25:33 GMT RE: WCF RIA Services Part 5 - Metadata and Shared Classes <p>Sam,</p> <p>Not sure I know what you mean. If you are really meaning page to page, you would leave the Silverlight application so it wouldn't apply. If you mean navigating from one logical page or screen to another within the Silverlight application, MVVM doesn't really address that at all. MVVM is all about how a view model supports a single view. It doesn't address how you navigate from view to view. For a couple ways to tackle that challenge, you can either use the Silverlight Navigation Framework or use Prism 4 navigation. The former is part of Silverlight, pick up a good book on Silverlight such as Silverlight 4 Unleashed or Silverlight 4 in Action, and the latter you can download and read about in the docs at prism.codeplex.com.</p> http://www.silverlightshow.net/items/WCF-RIA-Services-Part-5-Metadata-and-Shared-Classes.aspx#comment5125 Brian Noyes http://www.silverlightshow.net/items/WCF-RIA-Services-Part-5-Metadata-and-Shared-Classes.aspx Mon, 20 Dec 2010 02:27:26 GMT RE: WCF RIA Services Part 5 - Metadata and Shared Classes How can Pass Id from one page to other using MVVM http://www.silverlightshow.net/items/WCF-RIA-Services-Part-5-Metadata-and-Shared-Classes.aspx#comment5124 sam http://www.silverlightshow.net/items/WCF-RIA-Services-Part-5-Metadata-and-Shared-Classes.aspx Sun, 19 Dec 2010 21:08:53 GMT RE: WCF RIA Services Part 5 - Metadata and Shared Classes <p>Watch all the episodes of Silverlight TV. :)</p> <p>Prism is a framework for building loosely coupled, composite applications. It has features for building up your app out of loosely coupled modules, dynamically composing the UI out of loosely coupled UI parts, and having loosely coupled communications between those modules and their classes with commands and events. You can find out more by reading the book-style documentation that comes with the download at prism.codeplex.com, and it will also be released in Print form through O'Reilly in Feb timeframe, titled Developers Guide to Microsoft Prism 4 (I co-authored).</p> http://www.silverlightshow.net/items/WCF-RIA-Services-Part-5-Metadata-and-Shared-Classes.aspx#comment5028 Brian Noyes http://www.silverlightshow.net/items/WCF-RIA-Services-Part-5-Metadata-and-Shared-Classes.aspx Fri, 03 Dec 2010 00:44:06 GMT RE: WCF RIA Services Part 5 - Metadata and Shared Classes <p>Hi Brian,</p> <p>I already have added all the attributes as per you mentioned in your reply but still its not coming.</p> <p>Thanks for the books</p> <p>Could you also recommend some video's links for the Silverlight</p> <p>whats the role of prism in Silverlight?</p> <p><br /> </p> <p> </p> <p><br /> </p> http://www.silverlightshow.net/items/WCF-RIA-Services-Part-5-Metadata-and-Shared-Classes.aspx#comment5027 aarti291184 http://www.silverlightshow.net/items/WCF-RIA-Services-Part-5-Metadata-and-Shared-Classes.aspx Thu, 02 Dec 2010 19:16:41 GMT RE: WCF RIA Services Part 5 - Metadata and Shared Classes <p>Are you using the code download and modifying it or trying to code it up yourself? The download code should display a validation error (red box) on the Description field with a tooltip if you hover over the little red triangle in the upper right corner of that control. If that is not showing up with the unmodified code from the download, not sure why that would be. </p> <p>If you are coding it up yourself, you also need the binding on the textbox to enable validation for INotifyDataErrorInfo and exceptions:</p> <p></p> <pre style="font-family: consolas;"><span style="color: red;">Text</span><span style="color: blue;">="{</span><span style="color: #a31515;">Binding</span><span style="color: red;"> Description</span><span style="color: blue;">,</span><span style="color: red;"> Mode</span><span style="color: blue;">=</span><span style="color: blue;">TwoWay</span><span style="color: blue;">,</span><span style="color: red;"> ValidatesOnNotifyDataErrors</span><span style="color: blue;">=</span><span style="color: blue;">True</span><span style="color: blue;">,</span><span style="color: red;"> ValidatesOnExceptions</span><span style="color: blue;">=</span><span style="color: blue;">true</span><span style="color: blue;">,</span><span style="color: red;"> NotifyOnValidationError</span><span style="color: blue;">=</span><span style="color: blue;">True</span><span style="color: blue;">}</span><span style="color: blue;">"</span></pre> For learning Silverlight in general, I'd strongly recommend the following two books: <p></p> <p><a href="http://www.amazon.com/Silverlight-4-Unleashed-Laurent-Bugnion/dp/0672333368">Silverlight 4 Unleashed, Laurent Bunion</a></p> <p><a href="http://www.manning.com/pbrown/">Silverlight 4 in Action, Pete Brown</a></p> http://www.silverlightshow.net/items/WCF-RIA-Services-Part-5-Metadata-and-Shared-Classes.aspx#comment5019 Brian Noyes http://www.silverlightshow.net/items/WCF-RIA-Services-Part-5-Metadata-and-Shared-Classes.aspx Thu, 02 Dec 2010 11:52:23 GMT RE: WCF RIA Services Part 5 - Metadata and Shared Classes <p>Hi Brian,</p> <p>My mandatory message is not coming with the description textbox in the UI even if i added required attribute with respect to Description field in the TimeEntryMetadata</p> <p>what else i need to add it for coming validation message? </p> <p>Plz guide me </p> <p>I am new in the Silverlight</p> <p>And also give me guidance for how to learn Silverlight step by step</p> <p>Thanks in advance</p> http://www.silverlightshow.net/items/WCF-RIA-Services-Part-5-Metadata-and-Shared-Classes.aspx#comment4990 aarti291184 http://www.silverlightshow.net/items/WCF-RIA-Services-Part-5-Metadata-and-Shared-Classes.aspx Thu, 02 Dec 2010 07:30:48 GMT RE: WCF RIA Services Part 5 - Metadata and Shared Classes <p>aarti291184:</p> <p>Not clear what you mean with respect to "by using metadata classes". I've just confirmed on a clean machine that downloading the code, running the SQL script against a default SQL Server instance, and running works fine. If you ran the SQL script against a non-default instance of SQL (i.e. Express), you will have to modify the connection string in the web.config to reflect that to get the code to run. There are no time entries in the DB with the default data, just four tasks. But you should be able to add time entries to any of the tasks.</p> http://www.silverlightshow.net/items/WCF-RIA-Services-Part-5-Metadata-and-Shared-Classes.aspx#comment4988 Brian Noyes http://www.silverlightshow.net/items/WCF-RIA-Services-Part-5-Metadata-and-Shared-Classes.aspx Thu, 02 Dec 2010 00:03:16 GMT RE: WCF RIA Services Part 5 - Metadata and Shared Classes <p>Hi Brian,</p> <p>When I tried this post on yesterday ,I did not get data for Tasks and Time Entry entities by using metadata classes </p> <p>Can you plz help me </p> <p>what was the issue?</p> <p></p> http://www.silverlightshow.net/items/WCF-RIA-Services-Part-5-Metadata-and-Shared-Classes.aspx#comment4985 aarti291184 http://www.silverlightshow.net/items/WCF-RIA-Services-Part-5-Metadata-and-Shared-Classes.aspx Wed, 01 Dec 2010 07:59:50 GMT RE: WCF RIA Services Part 5 - Metadata and Shared Classes <p>yup that's done the trick, saved me 25% in data transfer :D</p> http://www.silverlightshow.net/items/WCF-RIA-Services-Part-5-Metadata-and-Shared-Classes.aspx#comment4524 Geert http://www.silverlightshow.net/items/WCF-RIA-Services-Part-5-Metadata-and-Shared-Classes.aspx Tue, 21 Sep 2010 17:19:44 GMT RE: WCF RIA Services Part 5 - Metadata and Shared Classes <p>yup that's done the trick, saved me 25% in data transfer :D</p> http://www.silverlightshow.net/items/WCF-RIA-Services-Part-5-Metadata-and-Shared-Classes.aspx#comment4523 Geert http://www.silverlightshow.net/items/WCF-RIA-Services-Part-5-Metadata-and-Shared-Classes.aspx Tue, 21 Sep 2010 15:24:55 GMT RE: WCF RIA Services Part 5 - Metadata and Shared Classes <p>Sure, only declare the partial class for your DTO in the client side project. You can still enhance the client side class yourself through partial class extensions in the client project in addition to what gets code generated and shared with the server side.</p> <p>Another example where you have to do this is if you want to have property change events fire, you override the partial methods defined in the code generated client class for each property changing.</p> http://www.silverlightshow.net/items/WCF-RIA-Services-Part-5-Metadata-and-Shared-Classes.aspx#comment4519 Brian Noyes http://www.silverlightshow.net/items/WCF-RIA-Services-Part-5-Metadata-and-Shared-Classes.aspx Mon, 20 Sep 2010 17:30:05 GMT RE: WCF RIA Services Part 5 - Metadata and Shared Classes <p>when I add some code like </p> <p><br /> </p> <div class="reCodeBlock" style="border:1px solid #7f9db9;overflow-y: auto;"> <div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #000000;">public string ShortDescription</code></span></div> <div style="background-color: #f8f8f8;"><span><code>        </code><span style="margin-left: 24px !important;"><code style="color: #000000;">{</code></span></span></div> <div style="background-color: #ffffff;"><span><code>            </code><span style="margin-left: 36px !important;"><code style="color: #000000;">get</code></span></span></div> <div style="background-color: #f8f8f8;"><span><code>            </code><span style="margin-left: 36px !important;"><code style="color: #000000;">{</code></span></span></div> <div style="background-color: #ffffff;"><span><code>                </code><span style="margin-left: 48px !important;"><code style="color: #000000;">if ((!string.IsNullOrEmpty(Description)) && (Description.Length > 200))</code></span></span></div> <div style="background-color: #f8f8f8;"><span><code>                    </code><span style="margin-left: 60px !important;"><code style="color: #000000;">return Description.Substring(0, 200);</code></span></span></div> <div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"> </span></div> <div style="background-color: #f8f8f8;"><span><code>                </code><span style="margin-left: 48px !important;"><code style="color: #000000;">return Description;</code></span></span></div> <div style="background-color: #ffffff;"><span><code>            </code><span style="margin-left: 36px !important;"><code style="color: #000000;">}</code></span></span></div> <div style="background-color: #f8f8f8;"><span><code>        </code><span style="margin-left: 24px !important;"><code style="color: #000000;">}</code></span></span></div> </div> <br /> <p><br /> </p> <p>where Description is a property of my DTO class defined as </p> <p><br /> </p> <div class="reCodeBlock" style="border:1px solid #7f9db9;overflow-y: auto;"> <div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #000000;">public string Description { get; set; }</code></span></div> </div> <br /> <p><br /> </p> <p>into a shared.cs, the content of the property ShortDescription is sent over the wire to the client. Is there a way to execute the ShortDescription logic on the client only?</p> <p><br /> </p> http://www.silverlightshow.net/items/WCF-RIA-Services-Part-5-Metadata-and-Shared-Classes.aspx#comment4517 Geert http://www.silverlightshow.net/items/WCF-RIA-Services-Part-5-Metadata-and-Shared-Classes.aspx Mon, 20 Sep 2010 15:51:59 GMT RE: WCF RIA Services Part 5 - Metadata and Shared Classes Bruce: The shared code files declared on the server side are code generated (copied) to the client side project at compile time and do get compiled into both the server assembly and the client assembly. http://www.silverlightshow.net/items/WCF-RIA-Services-Part-5-Metadata-and-Shared-Classes.aspx#comment4505 Brian Noyes http://www.silverlightshow.net/items/WCF-RIA-Services-Part-5-Metadata-and-Shared-Classes.aspx Sat, 18 Sep 2010 07:50:33 GMT RE: WCF RIA Services Part 5 - Metadata and Shared Classes i don't understand much about shared code between Server and Client Side. As I know, all code will be compiled to dll as well. http://www.silverlightshow.net/items/WCF-RIA-Services-Part-5-Metadata-and-Shared-Classes.aspx#comment4503 Bruce Do http://www.silverlightshow.net/items/WCF-RIA-Services-Part-5-Metadata-and-Shared-Classes.aspx Fri, 17 Sep 2010 23:25:20 GMT RE: WCF RIA Services Part 5 - Metadata and Shared Classes FYI the intro text "This article is Part 4 of the series WCF RIA Services" should read "This article is Part 5 of the series WCF RIA Services" http://www.silverlightshow.net/items/WCF-RIA-Services-Part-5-Metadata-and-Shared-Classes.aspx#comment4446 Dick in London http://www.silverlightshow.net/items/WCF-RIA-Services-Part-5-Metadata-and-Shared-Classes.aspx Sat, 11 Sep 2010 17:20:55 GMT RE: WCF RIA Services Part 5 - Metadata and Shared Classes I don't believe RIA Services will support interface-based entity types. It just works with concrete types that are part of your entity model. http://www.silverlightshow.net/items/WCF-RIA-Services-Part-5-Metadata-and-Shared-Classes.aspx#comment4378 Brian Noyes http://www.silverlightshow.net/items/WCF-RIA-Services-Part-5-Metadata-and-Shared-Classes.aspx Wed, 01 Sep 2010 00:03:19 GMT RE: WCF RIA Services Part 5 - Metadata and Shared Classes How can I add metadata when I don't know what the concrete type will be? I have an interface for my entity and do not know how it will be implemented. http://www.silverlightshow.net/items/WCF-RIA-Services-Part-5-Metadata-and-Shared-Classes.aspx#comment4377 Ray http://www.silverlightshow.net/items/WCF-RIA-Services-Part-5-Metadata-and-Shared-Classes.aspx Tue, 31 Aug 2010 23:17:59 GMT RE: WCF RIA Services Part 5 - Metadata and Shared Classes You rock http://www.silverlightshow.net/items/WCF-RIA-Services-Part-5-Metadata-and-Shared-Classes.aspx#comment4363 Anand Subramanian http://www.silverlightshow.net/items/WCF-RIA-Services-Part-5-Metadata-and-Shared-Classes.aspx Tue, 31 Aug 2010 00:14:19 GMT RE: WCF RIA Services Part 5 - Metadata and Shared Classes Nice Article http://www.silverlightshow.net/items/WCF-RIA-Services-Part-5-Metadata-and-Shared-Classes.aspx#comment4343 Minal http://www.silverlightshow.net/items/WCF-RIA-Services-Part-5-Metadata-and-Shared-Classes.aspx Fri, 27 Aug 2010 13:37:24 GMT RE: WCF RIA Services Part 5 - Metadata and Shared Classes can't wait for your next post:) http://www.silverlightshow.net/items/WCF-RIA-Services-Part-5-Metadata-and-Shared-Classes.aspx#comment4323 Aga http://www.silverlightshow.net/items/WCF-RIA-Services-Part-5-Metadata-and-Shared-Classes.aspx Tue, 24 Aug 2010 20:47:32 GMT RE: WCF RIA Services Part 5 - Metadata and Shared Classes simple and helpful http://www.silverlightshow.net/items/WCF-RIA-Services-Part-5-Metadata-and-Shared-Classes.aspx#comment4271 Veeru http://www.silverlightshow.net/items/WCF-RIA-Services-Part-5-Metadata-and-Shared-Classes.aspx Fri, 20 Aug 2010 13:08:34 GMT