[RIA Services] Use Shared class for metadatas

With WCF RIA Services and DomainServices, the metadatas file is generated from selected entities of the ADO.NET Entity Data Model. But if you want to add the “FullAddress” property in the metadatas, this error appears: “The associated metadata type for type ‘SharedInfos.Web.Customers’ contains the following unknown properties or fields: FullAddress. Please make sure that the names of these members match the names of the properties on the main type.” Shared classes allow completing this metadatas with properties and/or methods. This file has the .share.cs extension (or .shared.vb). Notice that the namespace must be the same as the Web project. namespace … Continue reading [RIA Services] Use Shared class for metadatas

[Silverlight] Three new Silverlight applications templates

Three new templates are available for Silverlight applications, both Silverlight Business Application and Silverlight Navigation Application. Furthermore style elements of these new themes are available to download, you can use them in any Silverlight applications. Finally these new themes include the new WCF RIA Services templates. These three new templates are : Windows 7 Cosmopolitan AccentColor   There are downloadable at this address, and these templates can easily be installed in Visual Studio 2010 : And Expression Blend 4 :

[OData] Create and expose your own OData flow

OData (Open Data Protocol) is a protocol on top of HTTP, based on REST architecture, that allows remote edition and use for different clients (RIA, Web, Mobile, etc…). So one can use Linq to request data from a client interface. With WCF RIA Services, it becomes possible to expose your own data easily. When you add a DomainService, you must check the box “Expose OData endpoint” and the selected tables will be exposed. In our example, we will expose the Customers and Orders tables from Northwind database.   Checking the box brings two important modifications to our code: In the … Continue reading [OData] Create and expose your own OData flow