<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" xml:lang="en-US"><title type="html">With Great Power comes Great Response.write("Ability")</title><subtitle type="html" /><id>http://blogs.msdn.com/phaniraj/atom.xml</id><link rel="alternate" type="text/html" href="http://blogs.msdn.com/phaniraj/default.aspx" /><generator uri="http://communityserver.org" version="2.1.61025.2">Community Server</generator><updated>2009-03-24T03:09:18Z</updated><link rel="self" href="http://feeds.feedburner.com/msdn/nbTP" type="application/atom+xml" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><entry><title>Please welcome the JAVA Client for ADO.NET Data Services</title><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/msdn/nbTP/~3/8bcpd-YlDg8/please-welcome-the-java-client-for-ado-net-data-services.aspx" /><id>http://blogs.msdn.com/phaniraj/archive/2009/09/29/please-welcome-the-java-client-for-ado-net-data-services.aspx</id><published>2009-09-29T06:49:00Z</published><updated>2009-09-29T06:49:00Z</updated><content type="html">&lt;P&gt;&lt;A href="http://blogs.msdn.com/interoperability/archive/2009/09/28/new-bridge-broadens-java-and-net-interoperability.aspx" mce_href="http://blogs.msdn.com/interoperability/archive/2009/09/28/new-bridge-broadens-java-and-net-interoperability.aspx"&gt;The new Java client&lt;/A&gt; joins a growing family of clients for ADO.NET Data Services, which include:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://aspnet.codeplex.com/Wiki/View.aspx?title=AJAX" mce_href="http://aspnet.codeplex.com/Wiki/View.aspx?title=AJAX"&gt;Ajax&lt;/A&gt; , &lt;A href="http://msdn.microsoft.com/en-us/magazine/cc794279.aspx" mce_href="http://msdn.microsoft.com/en-us/magazine/cc794279.aspx"&gt;Silverlight&lt;/A&gt; , &lt;A href="http://msdn.microsoft.com/en-us/library/system.data.services.client.aspx" mce_href="http://msdn.microsoft.com/en-us/library/system.data.services.client.aspx"&gt;.Net FX&lt;/A&gt; ,&lt;A href="http://aspnet.codeplex.com/Wiki/View.aspx?title=Dynamic%20Data" mce_href="http://aspnet.codeplex.com/Wiki/View.aspx?title=Dynamic%20Data"&gt;Dynamic Data&lt;/A&gt;, &lt;A href="http://blogs.msdn.com/interoperability/archive/2009/08/21/a-new-bridge-for-php-developers-to-net-through-rest-php-toolkit-for-ado-net-data-services.aspx" mce_href="http://blogs.msdn.com/interoperability/archive/2009/08/21/a-new-bridge-for-php-developers-to-net-through-rest-php-toolkit-for-ado-net-data-services.aspx"&gt;PHP&lt;/A&gt; .&lt;/P&gt;
&lt;P&gt;Here’s some documentation about the Java client &lt;A title=http://wiki.restlet.org/docs_2.0/13-restlet/28-restlet/287-restlet.html href="http://wiki.restlet.org/docs_2.0/13-restlet/28-restlet/287-restlet.html" mce_href="http://wiki.restlet.org/docs_2.0/13-restlet/28-restlet/287-restlet.html"&gt;http://wiki.restlet.org/docs_2.0/13-restlet/28-restlet/287-restlet.html&lt;/A&gt;.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9900583" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/msdn/nbTP/~4/8bcpd-YlDg8" height="1" width="1"/&gt;</content><author><name>PhaniRajuYN</name><uri>http://blogs.msdn.com/members/PhaniRajuYN.aspx</uri></author><category term="Astoria" scheme="http://blogs.msdn.com/phaniraj/archive/tags/Astoria/default.aspx" /><category term="Documentation" scheme="http://blogs.msdn.com/phaniraj/archive/tags/Documentation/default.aspx" /><category term="Do" scheme="http://blogs.msdn.com/phaniraj/archive/tags/Do/default.aspx" /><feedburner:origLink>http://blogs.msdn.com/phaniraj/archive/2009/09/29/please-welcome-the-java-client-for-ado-net-data-services.aspx</feedburner:origLink></entry><entry><title>Using the ADO.NET Data Services Silverlight client library in x-domain and out of browser scenarios – II (Forms Authentication)</title><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/msdn/nbTP/~3/8xp__AQ43MI/using-the-ado-net-data-services-silverlight-client-library-in-x-domain-and-out-of-browser-scenarios-ii-forms-authentication.aspx" /><link rel="enclosure" type="application/x-zip-compressed" length="3537053" href="http://blogs.msdn.com/phaniraj/attachment/9893382.ashx" /><id>http://blogs.msdn.com/phaniraj/archive/2009/09/10/using-the-ado-net-data-services-silverlight-client-library-in-x-domain-and-out-of-browser-scenarios-ii-forms-authentication.aspx</id><published>2009-09-10T02:20:00Z</published><updated>2009-09-10T02:20:00Z</updated><content type="html">&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;&lt;A href="http://blogs.msdn.com/phaniraj/attachment/9893382.ashx" mce_href="http://blogs.msdn.com/phaniraj/attachment/9893382.ashx"&gt;Click here to download sample application&lt;/A&gt;&lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Using the ADO.NET Data Services Silverlight client library in x-domain and out of browser scenarios – II (Forms Authentication) &lt;BR&gt;In this blog post, we will talk about using the Silverlight Client Library against a Data Service that is secured with Asp.Net Forms Authentication &lt;BR&gt;In short, the whole process of authenticating against a Forms Authentication protected Data Service looks like this. &lt;BR&gt;&lt;A href="http://blogs.msdn.com/blogfiles/phaniraj/WindowsLiveWriter/Usi.NETDataServicesSilverlightclientlibr_9C79/image_8.png" mce_href="http://blogs.msdn.com/blogfiles/phaniraj/WindowsLiveWriter/Usi.NETDataServicesSilverlightclientlibr_9C79/image_8.png"&gt;&lt;IMG style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title=image border=0 alt=image src="http://blogs.msdn.com/blogfiles/phaniraj/WindowsLiveWriter/Usi.NETDataServicesSilverlightclientlibr_9C79/image_thumb_3.png" width=729 height=303 mce_src="http://blogs.msdn.com/blogfiles/phaniraj/WindowsLiveWriter/Usi.NETDataServicesSilverlightclientlibr_9C79/image_thumb_3.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;H3&gt;Server Setup &lt;/H3&gt;
&lt;OL&gt;
&lt;LI&gt;Setup Forms Authentication on the Data Service Server &lt;/LI&gt;
&lt;LI&gt;Enable the WCF Authentication Service by following the reference here : &lt;A href="http://msdn.microsoft.com/en-us/library/bb398990.aspx" mce_href="http://msdn.microsoft.com/en-us/library/bb398990.aspx"&gt;How to: Enable the WCF Authentication Service&lt;/A&gt; &lt;/LI&gt;
&lt;LI&gt;Exclude the following resources from requiring authentication , &lt;/LI&gt;&lt;/OL&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;3.1 The WCF Authentication Service &lt;BR&gt;3.2 The ClientAccessPolicy.xml File &lt;BR&gt;Ex:&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;PRE class=csharpcode&gt;&lt;SPAN class=rem&gt;&amp;lt;!-- The ClientAccessPolicy.xml file is required for the client to confirm if the server allows X-Domain callers.&lt;/SPAN&gt;
&lt;SPAN class=rem&gt;       This should be downloadable without authenticating--&amp;gt;&lt;/SPAN&gt;
 &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;location&lt;/SPAN&gt; &lt;SPAN class=attr&gt;path&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="clientaccesspolicy.xml"&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;
    &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;system.web&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;
      &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;authorization&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;
        &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;allow&lt;/SPAN&gt; &lt;SPAN class=attr&gt;users&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="*"&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;/&amp;gt;&lt;/SPAN&gt;
      &lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;authorization&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;
    &lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;system.web&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;
  &lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;location&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;
 &lt;SPAN class=rem&gt;&amp;lt;!--This should be downloadable without authenticating.--&amp;gt;&lt;/SPAN&gt;
  &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;location&lt;/SPAN&gt; &lt;SPAN class=attr&gt;path&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="AuthenticationService.svc"&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;
    &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;system.web&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;
      &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;authorization&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;
        &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;allow&lt;/SPAN&gt; &lt;SPAN class=attr&gt;users&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="*"&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;/&amp;gt;&lt;/SPAN&gt;
      &lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;authorization&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;
    &lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;system.web&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;
  &lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;location&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;STYLE type=text/css&gt;.csharpcode {
	BACKGROUND-COLOR: #ffffff; FONT-FAMILY: consolas, "Courier New", courier, monospace; COLOR: black; FONT-SIZE: small
}
.csharpcode PRE {
	BACKGROUND-COLOR: #ffffff; FONT-FAMILY: consolas, "Courier New", courier, monospace; COLOR: black; FONT-SIZE: small
}
.csharpcode PRE {
	MARGIN: 0em
}
.csharpcode .rem {
	COLOR: #008000
}
.csharpcode .kwrd {
	COLOR: #0000ff
}
.csharpcode .str {
	COLOR: #006080
}
.csharpcode .op {
	COLOR: #0000c0
}
.csharpcode .preproc {
	COLOR: #cc6633
}
.csharpcode .asp {
	BACKGROUND-COLOR: #ffff00
}
.csharpcode .html {
	COLOR: #800000
}
.csharpcode .attr {
	COLOR: #ff0000
}
.csharpcode .alt {
	BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; WIDTH: 100%
}
.csharpcode .lnum {
	COLOR: #606060
}
&lt;/STYLE&gt;

&lt;P&gt;4. If the DataServiceHost does not have a global.asax file, add one to the project. &lt;BR&gt;5. In the Global.asax file, we need to listen on the &lt;A href="http://msdn.microsoft.com/en-us/library/system.web.applicationservices.authenticationservice.creatingcookie.aspx" mce_href="http://msdn.microsoft.com/en-us/library/system.web.applicationservices.authenticationservice.creatingcookie.aspx"&gt;AuthenticationService.CreatingCookie&lt;/A&gt; event to customize the FormsAuth Cookie that the service creates.&lt;/P&gt;
&lt;P&gt;&lt;B&gt;Why do we need to customize the FormsAuth cookie? &lt;BR&gt;&lt;/B&gt;The WCF Authentication service by default creates &lt;A href="http://msdn.microsoft.com/en-us/library/system.web.httpcookie.httponly.aspx" mce_href="http://msdn.microsoft.com/en-us/library/system.web.httpcookie.httponly.aspx"&gt;HTTPOnly&lt;/A&gt; Cookies. &lt;BR&gt;This means that the cookie isn’t accessible by client-script. &lt;BR&gt;It generally isn’t a problem when the client application is running in the same domain as the Website, &lt;BR&gt;as the browser handles cookie management for us transparently. &lt;BR&gt;When the client is not in the same domain as the Website, and we use the ClientHttpWebRequest networking stack, &lt;BR&gt;we are unable to access any cookies marked as HttpOnly. &lt;BR&gt;To work around this limitation, we recreate the FormsAuth cookie with HttpOnly set to false in the CreatingCookie event handler. &lt;BR&gt;For more details: &lt;A href="http://msdn.microsoft.com/en-us/library/bb398778.aspx" mce_href="http://msdn.microsoft.com/en-us/library/bb398778.aspx"&gt;How to: Customize the Authentication Cookie from the WCF Authentication Service&lt;/A&gt; &lt;BR&gt;Example code:&lt;/P&gt;&lt;PRE class=csharpcode&gt;&lt;SPAN class=kwrd&gt;protected&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;void&lt;/SPAN&gt; Application_Start(&lt;SPAN class=kwrd&gt;object&lt;/SPAN&gt; sender, EventArgs e)
{
&lt;SPAN class=rem&gt;//Handle the CreatingCookie event so that we can create a custom cookie with HttpOnly set to false.&lt;/SPAN&gt;
&lt;SPAN class=rem&gt;//AuthenticationService.CreatingCookie on MSDN :&lt;/SPAN&gt;
&lt;SPAN class=rem&gt;//http://msdn.microsoft.com/enus/library/system.web.applicationservices.authenticationservice.creatingcookie.aspx&lt;/SPAN&gt;
AuthenticationService.CreatingCookie += &lt;SPAN class=kwrd&gt;new&lt;/SPAN&gt; EventHandler&amp;lt;CreatingCookieEventArgs&amp;gt;(CreateSilverlightCompatibleHttpCookie);
}&lt;BR&gt;&lt;BR&gt;&lt;BR&gt;&lt;/PRE&gt;&lt;PRE class=csharpcode&gt;&lt;SPAN class=rem&gt;/// &amp;lt;summary&amp;gt;&lt;/SPAN&gt;
&lt;SPAN class=rem&gt;/// Creates a HttpCookie that can be read by the managed CookieContainer in ClientHttpWebRequest in Silverlight&lt;/SPAN&gt;
&lt;SPAN class=rem&gt;/// &amp;lt;/summary&amp;gt;&lt;/SPAN&gt;
&lt;SPAN class=rem&gt;/// &amp;lt;param name="sender"&amp;gt;The calling context for this event&amp;lt;/param&amp;gt;&lt;/SPAN&gt;
&lt;SPAN class=rem&gt;/// &amp;lt;param name="e"&amp;gt;a property bag containing useful information about the HttpCookie to create&amp;lt;/param&amp;gt;&lt;/SPAN&gt;
&lt;SPAN class=kwrd&gt;void&lt;/SPAN&gt; CreateSilverlightCompatibleHttpCookie(&lt;SPAN class=kwrd&gt;object&lt;/SPAN&gt; sender, System.Web.ApplicationServices.CreatingCookieEventArgs e)
{
  &lt;SPAN class=kwrd&gt;int&lt;/SPAN&gt; cookieVersion = 1;
  &lt;SPAN class=rem&gt;//The time at which the cookie was issued by the server&lt;/SPAN&gt;
  DateTime cookieIssueDate = DateTime.Now;
  &lt;SPAN class=rem&gt;//The relative time from now when the cookie will expire and the client will have to re-authenticate.&lt;/SPAN&gt;
  DateTime cookieExpiryDate = DateTime.Now.AddMinutes(30);
  &lt;SPAN class=rem&gt;//The Forms Auth ticket which uniquely identifies a user &lt;/SPAN&gt;
  &lt;SPAN class=rem&gt;//FormsAuthenticationTicket on MSDN : http://msdn.microsoft.com/en-us/library/system.web.security.formsauthenticationticket.aspx&lt;/SPAN&gt;
  FormsAuthenticationTicket ticket = &lt;SPAN class=kwrd&gt;new&lt;/SPAN&gt; FormsAuthenticationTicket
                (cookieVersion,
                 e.UserName,
                 cookieIssueDate,
                 cookieExpiryDate,
                 e.IsPersistent, &lt;SPAN class=rem&gt;/*Indicates whether the authentication cookie should be retained beyond the current session*/&lt;/SPAN&gt;
                 e.CustomCredential,
                 FormsAuthentication.FormsCookiePath);
 &lt;SPAN class=rem&gt;//Creates a string containing an encrypted forms-authentication ticket suitable for use in an HTTP cookie.&lt;/SPAN&gt;
 &lt;SPAN class=rem&gt;//FormsAuthentication.Encrypt on MSDN : http://msdn.microsoft.com/en-us/library/system.web.security.formsauthentication.encrypt.aspx&lt;/SPAN&gt;
  &lt;SPAN class=kwrd&gt;string&lt;/SPAN&gt; encryptedTicket = FormsAuthentication.Encrypt(ticket);
  HttpCookie cookie = &lt;SPAN class=kwrd&gt;new&lt;/SPAN&gt; HttpCookie(FormsAuthentication.FormsCookieName, encryptedTicket);
  &lt;SPAN class=rem&gt;//set HttpOnly to false so that the managed CookieContainer can read the FormsAuth cookie from the response.&lt;/SPAN&gt;
  cookie.HttpOnly = &lt;SPAN class=kwrd&gt;false&lt;/SPAN&gt;;
  cookie.Expires = cookieExpiryDate;
  HttpContext.Current.Response.Cookies.Add(cookie);
  e.CookieIsSet = &lt;SPAN class=kwrd&gt;true&lt;/SPAN&gt;;
 }&lt;/PRE&gt;
&lt;STYLE type=text/css&gt;.csharpcode {
	BACKGROUND-COLOR: #ffffff; FONT-FAMILY: consolas, "Courier New", courier, monospace; COLOR: black; FONT-SIZE: small
}
.csharpcode PRE {
	BACKGROUND-COLOR: #ffffff; FONT-FAMILY: consolas, "Courier New", courier, monospace; COLOR: black; FONT-SIZE: small
}
.csharpcode PRE {
	MARGIN: 0em
}
.csharpcode .rem {
	COLOR: #008000
}
.csharpcode .kwrd {
	COLOR: #0000ff
}
.csharpcode .str {
	COLOR: #006080
}
.csharpcode .op {
	COLOR: #0000c0
}
.csharpcode .preproc {
	COLOR: #cc6633
}
.csharpcode .asp {
	BACKGROUND-COLOR: #ffff00
}
.csharpcode .html {
	COLOR: #800000
}
.csharpcode .attr {
	COLOR: #ff0000
}
.csharpcode .alt {
	BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; WIDTH: 100%
}
.csharpcode .lnum {
	COLOR: #606060
}
&lt;/STYLE&gt;

&lt;STYLE type=text/css&gt;.csharpcode {
	BACKGROUND-COLOR: #ffffff; FONT-FAMILY: consolas, "Courier New", courier, monospace; COLOR: black; FONT-SIZE: small
}
.csharpcode PRE {
	BACKGROUND-COLOR: #ffffff; FONT-FAMILY: consolas, "Courier New", courier, monospace; COLOR: black; FONT-SIZE: small
}
.csharpcode PRE {
	MARGIN: 0em
}
.csharpcode .rem {
	COLOR: #008000
}
.csharpcode .kwrd {
	COLOR: #0000ff
}
.csharpcode .str {
	COLOR: #006080
}
.csharpcode .op {
	COLOR: #0000c0
}
.csharpcode .preproc {
	COLOR: #cc6633
}
.csharpcode .asp {
	BACKGROUND-COLOR: #ffff00
}
.csharpcode .html {
	COLOR: #800000
}
.csharpcode .attr {
	COLOR: #ff0000
}
.csharpcode .alt {
	BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; WIDTH: 100%
}
.csharpcode .lnum {
	COLOR: #606060
}
&lt;/STYLE&gt;

&lt;H3&gt;Silverlight Client Setup&lt;/H3&gt;
&lt;P&gt;We will follow an adapter pattern which is responsible for logging in the user and injecting the FormsAuth cookie as the client library makes requests. &lt;BR&gt;To start with,&lt;B&gt; add a Service reference to the WCF Authentication service in the Silverlight Client application or use the one in the sample.&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;The FormsAuthAdapter will use the client side proxy generated for the WCF Authentication service to login the user &lt;BR&gt;and hook into any attached DataServiceContext instance’s SendingRequest event to inject the FormsAuth cookie. &lt;BR&gt;An instance of the FormsAuthenticationAdapter is declared at the application level.&lt;/P&gt;&lt;PRE class=csharpcode&gt;&lt;SPAN class=kwrd&gt;public&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;partial&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;class&lt;/SPAN&gt; App : Application
{
&lt;SPAN class=rem&gt;/// &amp;lt;summary&amp;gt;&lt;/SPAN&gt;
&lt;SPAN class=rem&gt;/// FormsAuthenticationAdapter instance to manage authentication against a WCF Authentication Service&lt;/SPAN&gt;
&lt;SPAN class=rem&gt;/// &amp;lt;/summary&amp;gt;&lt;/SPAN&gt;
&lt;SPAN class=kwrd&gt;public&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;static&lt;/SPAN&gt; FormsAuthenticationAdapter FormsAuthAdapter;&lt;/PRE&gt;
&lt;STYLE type=text/css&gt;.csharpcode {
	BACKGROUND-COLOR: #ffffff; FONT-FAMILY: consolas, "Courier New", courier, monospace; COLOR: black; FONT-SIZE: small
}
.csharpcode PRE {
	BACKGROUND-COLOR: #ffffff; FONT-FAMILY: consolas, "Courier New", courier, monospace; COLOR: black; FONT-SIZE: small
}
.csharpcode PRE {
	MARGIN: 0em
}
.csharpcode .rem {
	COLOR: #008000
}
.csharpcode .kwrd {
	COLOR: #0000ff
}
.csharpcode .str {
	COLOR: #006080
}
.csharpcode .op {
	COLOR: #0000c0
}
.csharpcode .preproc {
	COLOR: #cc6633
}
.csharpcode .asp {
	BACKGROUND-COLOR: #ffff00
}
.csharpcode .html {
	COLOR: #800000
}
.csharpcode .attr {
	COLOR: #ff0000
}
.csharpcode .alt {
	BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; WIDTH: 100%
}
.csharpcode .lnum {
	COLOR: #606060
}
&lt;/STYLE&gt;

&lt;P&gt;&lt;BR&gt;This is initialized when the Application starts.&lt;/P&gt;&lt;PRE class=csharpcode&gt;&lt;SPAN class=kwrd&gt;private&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;void&lt;/SPAN&gt; Application_Startup(&lt;SPAN class=kwrd&gt;object&lt;/SPAN&gt; sender, StartupEventArgs e)
{
&lt;SPAN class=kwrd&gt;string&lt;/SPAN&gt; authServiceUri = String.Empty;
&lt;SPAN class=rem&gt;//extract the AuthenticationService Uri from the App.XAML file&lt;/SPAN&gt;
&lt;SPAN class=kwrd&gt;if&lt;/SPAN&gt; (&lt;SPAN class=kwrd&gt;this&lt;/SPAN&gt;.Resources.Contains(&lt;SPAN class=str&gt;"AuthenticationServiceUri"&lt;/SPAN&gt;))
{
authServiceUri = &lt;SPAN class=kwrd&gt;this&lt;/SPAN&gt;.Resources[&lt;SPAN class=str&gt;"AuthenticationServiceUri"&lt;/SPAN&gt;].ToString();
}
FormsAuthAdapter = &lt;SPAN class=kwrd&gt;new&lt;/SPAN&gt; FormsAuthenticationAdapter(&lt;SPAN class=kwrd&gt;new&lt;/SPAN&gt; Uri(authServiceUri, UriKind.RelativeOrAbsolute));
&lt;SPAN class=rem&gt;//The FormsAuthCookieName  should be the same value as declared in the Web.config of the server&lt;/SPAN&gt;
&lt;SPAN class=rem&gt;//ex: If your web.config on the server requiring Forms Authentication is :&lt;/SPAN&gt;
&lt;SPAN class=rem&gt;//&amp;lt;authentication mode="Forms"&amp;gt;&lt;/SPAN&gt;
&lt;SPAN class=rem&gt;//  &amp;lt;forms loginUrl="LoginForm.aspx" name=".ASPXFormsAUTH" protection="All" path="/" /&amp;gt;&lt;/SPAN&gt;
&lt;SPAN class=rem&gt;//&amp;lt;/authentication&amp;gt;&lt;/SPAN&gt;
    FormsAuthAdapter.FormsAuthCookieName = &lt;SPAN class=str&gt;".ASPXFormsAUTH"&lt;/SPAN&gt;;
    &lt;SPAN class=kwrd&gt;this&lt;/SPAN&gt;.RootVisual = &lt;SPAN class=kwrd&gt;new&lt;/SPAN&gt; MainPage();
    &lt;SPAN class=rem&gt;//Uncomment the below 2 lines to show the Loginwindow on application startup&lt;/SPAN&gt;
    &lt;SPAN class=rem&gt;//LoginWindow login = new LoginWindow();&lt;/SPAN&gt;
    &lt;SPAN class=rem&gt;//login.Show();&lt;/SPAN&gt;
}&lt;/PRE&gt;
&lt;STYLE type=text/css&gt;.csharpcode {
	BACKGROUND-COLOR: #ffffff; FONT-FAMILY: consolas, "Courier New", courier, monospace; COLOR: black; FONT-SIZE: small
}
.csharpcode PRE {
	BACKGROUND-COLOR: #ffffff; FONT-FAMILY: consolas, "Courier New", courier, monospace; COLOR: black; FONT-SIZE: small
}
.csharpcode PRE {
	MARGIN: 0em
}
.csharpcode .rem {
	COLOR: #008000
}
.csharpcode .kwrd {
	COLOR: #0000ff
}
.csharpcode .str {
	COLOR: #006080
}
.csharpcode .op {
	COLOR: #0000c0
}
.csharpcode .preproc {
	COLOR: #cc6633
}
.csharpcode .asp {
	BACKGROUND-COLOR: #ffff00
}
.csharpcode .html {
	COLOR: #800000
}
.csharpcode .attr {
	COLOR: #ff0000
}
.csharpcode .alt {
	BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; WIDTH: 100%
}
.csharpcode .lnum {
	COLOR: #606060
}
&lt;/STYLE&gt;

&lt;P&gt;This is what our client application looks like: &lt;BR&gt;&lt;A href="http://blogs.msdn.com/blogfiles/phaniraj/WindowsLiveWriter/Usi.NETDataServicesSilverlightclientlibr_9C79/image_2.png" mce_href="http://blogs.msdn.com/blogfiles/phaniraj/WindowsLiveWriter/Usi.NETDataServicesSilverlightclientlibr_9C79/image_2.png"&gt;&lt;IMG style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title=image border=0 alt=image src="http://blogs.msdn.com/blogfiles/phaniraj/WindowsLiveWriter/Usi.NETDataServicesSilverlightclientlibr_9C79/image_thumb.png" width=580 height=455 mce_src="http://blogs.msdn.com/blogfiles/phaniraj/WindowsLiveWriter/Usi.NETDataServicesSilverlightclientlibr_9C79/image_thumb.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;As you can see, along with the “Install me” button, we now have a “Login” button.&lt;/P&gt;
&lt;P&gt;When the page loads, we attach an instance of the DataServiceContext which we want to get the FormsAuth Cookie injected while &lt;BR&gt;making requests to the Data Service.&lt;/P&gt;&lt;PRE class=csharpcode&gt;&lt;SPAN class=rem&gt;//Attach the DataServiceContext instance so that we can inject the FormsAuth cookie for each request&lt;/SPAN&gt;
App.FormsAuthAdapter.Attach(publicationContext);
Where the Attach Method’s signature &lt;SPAN class=kwrd&gt;is&lt;/SPAN&gt; :
&lt;SPAN class=rem&gt;/// &amp;lt;summary&amp;gt;&lt;/SPAN&gt;
&lt;SPAN class=rem&gt;/// Injects the FormsAuth cookie when the contextInstance makes a request to the DataService&lt;/SPAN&gt;
&lt;SPAN class=rem&gt;/// &amp;lt;/summary&amp;gt;&lt;/SPAN&gt;
&lt;SPAN class=rem&gt;/// &amp;lt;param name="contextInstance"&amp;gt;The DataServiceContext instance to observe&amp;lt;/param&amp;gt;&lt;/SPAN&gt;
&lt;SPAN class=kwrd&gt;public&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;void&lt;/SPAN&gt; Attach(DataServiceContext contextInstance)&lt;/PRE&gt;
&lt;STYLE type=text/css&gt;.csharpcode {
	BACKGROUND-COLOR: #ffffff; FONT-FAMILY: consolas, "Courier New", courier, monospace; COLOR: black; FONT-SIZE: small
}
.csharpcode PRE {
	BACKGROUND-COLOR: #ffffff; FONT-FAMILY: consolas, "Courier New", courier, monospace; COLOR: black; FONT-SIZE: small
}
.csharpcode PRE {
	MARGIN: 0em
}
.csharpcode .rem {
	COLOR: #008000
}
.csharpcode .kwrd {
	COLOR: #0000ff
}
.csharpcode .str {
	COLOR: #006080
}
.csharpcode .op {
	COLOR: #0000c0
}
.csharpcode .preproc {
	COLOR: #cc6633
}
.csharpcode .asp {
	BACKGROUND-COLOR: #ffff00
}
.csharpcode .html {
	COLOR: #800000
}
.csharpcode .attr {
	COLOR: #ff0000
}
.csharpcode .alt {
	BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; WIDTH: 100%
}
.csharpcode .lnum {
	COLOR: #606060
}
&lt;/STYLE&gt;

&lt;P&gt;Clicking the login button on the main page opens up a ChildWindow instance that we created which emulates the Login Screen. &lt;/P&gt;
&lt;P&gt;Login button click handler:&lt;/P&gt;&lt;PRE class=csharpcode&gt;&lt;SPAN class=kwrd&gt;void&lt;/SPAN&gt; LoginUser(&lt;SPAN class=kwrd&gt;object&lt;/SPAN&gt; sender, RoutedEventArgs e)
{
    LoginWindow login = &lt;SPAN class=kwrd&gt;new&lt;/SPAN&gt; LoginWindow();
    login.Show();
    &lt;SPAN class=rem&gt;//The LoginWindow only closes if Authentication succeeds&lt;/SPAN&gt;
    login.Closing += (s, eArgs) =&amp;gt;
    {
       &lt;SPAN class=rem&gt;/*If auth succeeds,hide the button*/&lt;/SPAN&gt;
       btnLogin.Visibility = Visibility.Collapsed;
    };
  }&lt;/PRE&gt;
&lt;STYLE type=text/css&gt;.csharpcode {
	BACKGROUND-COLOR: #ffffff; FONT-FAMILY: consolas, "Courier New", courier, monospace; COLOR: black; FONT-SIZE: small
}
.csharpcode PRE {
	BACKGROUND-COLOR: #ffffff; FONT-FAMILY: consolas, "Courier New", courier, monospace; COLOR: black; FONT-SIZE: small
}
.csharpcode PRE {
	MARGIN: 0em
}
.csharpcode .rem {
	COLOR: #008000
}
.csharpcode .kwrd {
	COLOR: #0000ff
}
.csharpcode .str {
	COLOR: #006080
}
.csharpcode .op {
	COLOR: #0000c0
}
.csharpcode .preproc {
	COLOR: #cc6633
}
.csharpcode .asp {
	BACKGROUND-COLOR: #ffff00
}
.csharpcode .html {
	COLOR: #800000
}
.csharpcode .attr {
	COLOR: #ff0000
}
.csharpcode .alt {
	BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; WIDTH: 100%
}
.csharpcode .lnum {
	COLOR: #606060
}
&lt;/STYLE&gt;

&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/phaniraj/WindowsLiveWriter/Usi.NETDataServicesSilverlightclientlibr_9C79/image_6.png" mce_href="http://blogs.msdn.com/blogfiles/phaniraj/WindowsLiveWriter/Usi.NETDataServicesSilverlightclientlibr_9C79/image_6.png"&gt;&lt;IMG style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title=image border=0 alt=image src="http://blogs.msdn.com/blogfiles/phaniraj/WindowsLiveWriter/Usi.NETDataServicesSilverlightclientlibr_9C79/image_thumb_2.png" width=582 height=429 mce_src="http://blogs.msdn.com/blogfiles/phaniraj/WindowsLiveWriter/Usi.NETDataServicesSilverlightclientlibr_9C79/image_thumb_2.png"&gt;&lt;/A&gt; &lt;BR&gt;The LoginWindow’s “Login” button uses the application wide FormsAuthenticationAdapter instance, discussed above, to login the user. &lt;/P&gt;&lt;PRE class=csharpcode&gt;&lt;SPAN class=kwrd&gt;private&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;void&lt;/SPAN&gt; LoginUser(&lt;SPAN class=kwrd&gt;object&lt;/SPAN&gt; sender, RoutedEventArgs e)
{
App.FormsAuthAdapter.LoginAsync(txtUserName.Text, txtPassword.Password,
    (loginEventArgs) =&amp;gt;
    {
&lt;SPAN class=kwrd&gt;      if&lt;/SPAN&gt; (loginEventArgs.Result)
       {
         &lt;SPAN class=rem&gt;/*Login succeeded*/&lt;/SPAN&gt;
         &lt;SPAN class=kwrd&gt;this&lt;/SPAN&gt;.DialogResult = &lt;SPAN class=kwrd&gt;true&lt;/SPAN&gt;;
       }
&lt;SPAN class=kwrd&gt;       else&lt;/SPAN&gt;
      {
         &lt;SPAN class=rem&gt;/*Login failed*/&lt;/SPAN&gt;
      }
    }
    );
}
The LoginAsync method’s signature &lt;SPAN class=kwrd&gt;is&lt;/SPAN&gt;:
  &lt;SPAN class=rem&gt;/// &amp;lt;summary&amp;gt;&lt;/SPAN&gt;
&lt;SPAN class=rem&gt;/// Logs in the User and calls the LoginComplete handler&lt;/SPAN&gt;
&lt;SPAN class=rem&gt;/// &amp;lt;/summary&amp;gt;&lt;/SPAN&gt;
&lt;SPAN class=rem&gt;/// &amp;lt;param name="userName"&amp;gt;UserName to login &amp;lt;/param&amp;gt;&lt;/SPAN&gt;
&lt;SPAN class=rem&gt;/// &amp;lt;param name="passWord"&amp;gt;password for the user account&amp;lt;/param&amp;gt;&lt;/SPAN&gt;
&lt;SPAN class=rem&gt;/// &amp;lt;param name="pLoginComplete"&amp;gt;Called when the login process is complete&amp;lt;/param&amp;gt;&lt;/SPAN&gt;
&lt;SPAN class=kwrd&gt;public&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;void&lt;/SPAN&gt; LoginAsync(&lt;SPAN class=kwrd&gt;string&lt;/SPAN&gt; userName, &lt;SPAN class=kwrd&gt;string&lt;/SPAN&gt; passWord, Action&amp;lt;LoginCompletedEventArgs&amp;gt; pLoginComplete)&lt;/PRE&gt;
&lt;STYLE type=text/css&gt;.csharpcode {
	BACKGROUND-COLOR: #ffffff; FONT-FAMILY: consolas, "Courier New", courier, monospace; COLOR: black; FONT-SIZE: small
}
.csharpcode PRE {
	BACKGROUND-COLOR: #ffffff; FONT-FAMILY: consolas, "Courier New", courier, monospace; COLOR: black; FONT-SIZE: small
}
.csharpcode PRE {
	MARGIN: 0em
}
.csharpcode .rem {
	COLOR: #008000
}
.csharpcode .kwrd {
	COLOR: #0000ff
}
.csharpcode .str {
	COLOR: #006080
}
.csharpcode .op {
	COLOR: #0000c0
}
.csharpcode .preproc {
	COLOR: #cc6633
}
.csharpcode .asp {
	BACKGROUND-COLOR: #ffff00
}
.csharpcode .html {
	COLOR: #800000
}
.csharpcode .attr {
	COLOR: #ff0000
}
.csharpcode .alt {
	BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; WIDTH: 100%
}
.csharpcode .lnum {
	COLOR: #606060
}
&lt;/STYLE&gt;

&lt;P&gt;&lt;BR&gt;&lt;BR&gt;Once the user types in his/her username and password and hits “Login” , the Login window hits the WCF authentication service &lt;BR&gt;and extracts the FormsAuth cookie from the response.When the client library makes a request to the Data Service , the FormsAuthenticationAdapter &lt;BR&gt;injects the FormsAuth cookie &lt;/P&gt;
&lt;P&gt;&lt;B&gt;Common errors:&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;1. You receive an ArgumentException when trying to set the cookie header in the SendingRequest event.&lt;/P&gt;
&lt;P&gt;a. System.ArgumentException occurred &lt;BR&gt;&amp;nbsp; Message="The 'Cookie' header cannot be modified directly.\r\nParameter name: name" &lt;BR&gt;&amp;nbsp; StackTrace: &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at System.Net.WebHeaderCollection.ThrowOnRestrictedHeader(String name, String value) &lt;BR&gt;&amp;nbsp; InnerException: &lt;/P&gt;
&lt;P&gt;&lt;B&gt;Resolution: &lt;/B&gt;The reason you get this is because the client library is using the classic networking stack (based on XmlHttpRequest) &lt;BR&gt;to make the request. In this case, the Cookie header isn’t accessible and the above exception is valid. &lt;BR&gt;This is probably the only case where we would ask you to set the HttpStack property on the Client library. &lt;BR&gt;To fix this: &lt;BR&gt;//Set the HttpStack on the client Context instance to force the client library &lt;/P&gt;
&lt;P&gt;//to use the ClientHttpWebRequest stack for network access &lt;BR&gt;publicationContext.HttpStack = HttpStack.ClientHttp;&lt;B&gt; &lt;BR&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;Additional resources:&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;How do I authenticate my users against the Active Directory from my Silverlight application? &lt;BR&gt;&lt;/B&gt;In ASP.NET Forms Authentication, the Membership provider is responsible for accessing the Credential store and validating the user name and password. &lt;BR&gt;By setting the Membership provider to be the ActiveDirectoryMembershipProvider , you can authenticate the user name and password the user enters &lt;BR&gt;with the credentials stored in Active Directory. For more details , please refer to this MSDN article :&lt;/P&gt;
&lt;P&gt;&lt;A href="http://msdn.microsoft.com/en-us/library/ms998347.aspx#paght000022_usingtheactivedirectorymembershipprovider" mce_href="http://msdn.microsoft.com/en-us/library/ms998347.aspx#paght000022_usingtheactivedirectorymembershipprovider"&gt;Using the ActiveDirectoryMembershipProvider&lt;/A&gt; &lt;BR&gt;&lt;B&gt;References :&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://msdn.microsoft.com/en-us/library/dd470115(VS.95).aspx" mce_href="http://msdn.microsoft.com/en-us/library/dd470115(VS.95).aspx"&gt;About ClientAccessPolicy.xml files&lt;/A&gt; &lt;BR&gt;&lt;A href="http://msdn.microsoft.com/en-us/library/bb547119.aspx" mce_href="http://msdn.microsoft.com/en-us/library/bb547119.aspx"&gt;ASP.NET Application Services.&lt;/A&gt; &lt;BR&gt;&lt;A href="http://msdn.microsoft.com/en-us/library/aa480476.aspx" mce_href="http://msdn.microsoft.com/en-us/library/aa480476.aspx"&gt;ASP.NET Forms Authentication&lt;/A&gt; &lt;BR&gt;&lt;A href="http://msdn.microsoft.com/en-us/library/sx3h274z.aspx" mce_href="http://msdn.microsoft.com/en-us/library/sx3h274z.aspx"&gt;Membership Providers&lt;/A&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9893382" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/msdn/nbTP/~4/8xp__AQ43MI" height="1" width="1"/&gt;</content><author><name>PhaniRajuYN</name><uri>http://blogs.msdn.com/members/PhaniRajuYN.aspx</uri></author><category term="Demo" scheme="http://blogs.msdn.com/phaniraj/archive/tags/Demo/default.aspx" /><category term="Documentation" scheme="http://blogs.msdn.com/phaniraj/archive/tags/Documentation/default.aspx" /><category term="Silverlight" scheme="http://blogs.msdn.com/phaniraj/archive/tags/Silverlight/default.aspx" /><category term="Forms Authentication" scheme="http://blogs.msdn.com/phaniraj/archive/tags/Forms+Authentication/default.aspx" /><feedburner:origLink>http://blogs.msdn.com/phaniraj/archive/2009/09/10/using-the-ado-net-data-services-silverlight-client-library-in-x-domain-and-out-of-browser-scenarios-ii-forms-authentication.aspx</feedburner:origLink></entry><entry><title>Using the PHP Toolkit with ADO.NET Data Services</title><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/msdn/nbTP/~3/ymGdHyOwQdU/using-the-php-toolkit-with-ado-net-data-services.aspx" /><id>http://blogs.msdn.com/phaniraj/archive/2009/09/08/using-the-php-toolkit-with-ado-net-data-services.aspx</id><published>2009-09-09T01:17:00Z</published><updated>2009-09-09T01:17:00Z</updated><content type="html">&lt;ol&gt;   &lt;li&gt;&lt;a href="#Step1"&gt;Setup PHP on your windows machine&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="#Step2"&gt;Setup the PHP Toolkit &lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="#Step3"&gt;Setting up the PHP samples on IIS&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="#Step4"&gt;Running the sample ADO.NET Data Services&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="#Step5"&gt;PHP Sample Applications Walkthrough&lt;/a&gt; &lt;/li&gt; &lt;/ol&gt; &lt;a name="Step1"&gt;   &lt;h3&gt;Setup PHP on your windows machine&lt;/h3&gt; &lt;/a&gt;  &lt;p&gt;The following steps show you how to setup your windows machine to host PHP applications.    &lt;br /&gt;We will be talking about hosting the only supported ( by MS Support ) PHP CGI application on IIS .&lt;/p&gt;  &lt;p&gt;&lt;a href="http://learn.iis.net/page.aspx/246/using-fastcgi-to-host-php-applications-on-iis-70/"&gt;Using FastCGI to Host PHP Applications on IIS 7.0&lt;/a&gt;&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;If you don’t find the &lt;strong&gt;php.ini-recommended &lt;/strong&gt;file , then rename the &lt;strong&gt;php.ini-development &lt;/strong&gt;file from your PHP folder. &lt;/li&gt;    &lt;li&gt;Once you are setup , if you get a HTTP 500 internal server error when browsing to the Php.ini file ,      &lt;br /&gt;then you need setup your timezone in the PHP.ini file . &lt;/li&gt;    &lt;li&gt;To do this , find the line in the php.ini file “date.timezone” . &lt;/li&gt;    &lt;li&gt;If it has a semi-colon before it , remove it . &lt;/li&gt;    &lt;li&gt;Set the date.timezone’s&amp;#160; value to be a valid value from this list : &lt;a href="http://nl3.php.net/manual/en/timezones.php"&gt;List of Supported Timezones&lt;/a&gt; &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;In my php.ini , I have set the value to be &lt;strong&gt;date.timezone = &amp;quot;America/Los_Angeles&amp;quot;&lt;/strong&gt;&lt;/p&gt; &lt;a name="Step2"&gt;   &lt;h3&gt;Setup the PHP Toolkit&lt;/h3&gt; &lt;/a&gt;  &lt;p&gt;Follow the instructions on the codeplex site to setup your machine.    &lt;br /&gt;&lt;a href="http://phpdataservices.codeplex.com/Wiki/View.aspx?title=InstallationGuide"&gt;Installation and Configuration&lt;/a&gt;&lt;/p&gt; &lt;a name="Step3"&gt;   &lt;h3&gt;Setting up the PHP samples on IIS &lt;/h3&gt; &lt;/a&gt;  &lt;p&gt;I have copied the phpsamples folder from the downloaded phpdataservices1.0 folder    &lt;br /&gt;into the %SystemDrive%\inetpub\wwwroot folder.This is just so that I dont need to configure any permissions     &lt;br /&gt;for the IIS accounts.     &lt;br /&gt;Open the IIS manager by running “INETMGR” from the “run” prompt on the start menu&lt;/p&gt;  &lt;p&gt;Select the PHPSamples folder from the “Default Web Site”    &lt;br /&gt;&lt;a href="http://blogs.msdn.com/blogfiles/phaniraj/WindowsLiveWriter/UsingthePHPToolkitwithAD.NETDataServices_143D1/Samples_Not_Application_2.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Samples_Not_Application" border="0" alt="Samples_Not_Application" src="http://blogs.msdn.com/blogfiles/phaniraj/WindowsLiveWriter/UsingthePHPToolkitwithAD.NETDataServices_143D1/Samples_Not_Application_thumb_1.png" width="146" height="154" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Right-Click the Virtual directory and select “Convert to Application”    &lt;br /&gt;&lt;a href="http://blogs.msdn.com/blogfiles/phaniraj/WindowsLiveWriter/UsingthePHPToolkitwithAD.NETDataServices_143D1/Samples_To_Application.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Samples_To_Application" border="0" alt="Samples_To_Application" src="http://blogs.msdn.com/blogfiles/phaniraj/WindowsLiveWriter/UsingthePHPToolkitwithAD.NETDataServices_143D1/Samples_To_Application_thumb.png" width="204" height="240" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Confirm creating the virtual directory by&amp;#160; pressing “OK” in the next dialog that turns up    &lt;br /&gt;&lt;a href="http://blogs.msdn.com/blogfiles/phaniraj/WindowsLiveWriter/UsingthePHPToolkitwithAD.NETDataServices_143D1/Samples_To_Application_Confirm.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Samples_To_Application_Confirm" border="0" alt="Samples_To_Application_Confirm" src="http://blogs.msdn.com/blogfiles/phaniraj/WindowsLiveWriter/UsingthePHPToolkitwithAD.NETDataServices_143D1/Samples_To_Application_Confirm_thumb.png" width="380" height="263" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;This sets up the PHP applications that access the ADO.NET Data Service,    &lt;br /&gt;We still need to setup the actual Data Services that the PHP Samples access.&lt;/p&gt; &lt;a name="Step4"&gt;   &lt;h3&gt;Running the sample&amp;#160; ADO.NET Data Services&lt;/h3&gt; &lt;/a&gt;  &lt;p&gt;Find the ADODotNetDataServices folder in the PHPDataServices1.0 download.    &lt;br /&gt;This should be under the “samples” directory.     &lt;br /&gt;i.e PHPDataServices1.0\samples\ADODotNetDataServices     &lt;br /&gt;&lt;/p&gt;  &lt;h2&gt;Setup the Databases required for the project to run &lt;/h2&gt;  &lt;p&gt;1) Unzip the zipped database files from the &lt;/p&gt; PHPDataServices1.0\samples\ADODotNetDataServices\data folder.   &lt;br /&gt;2)&amp;#160;&amp;#160; Open up SQL management studio and Connect to your Database server   &lt;br /&gt;3) Right–click the databases node and select “Attach…”   &lt;br /&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/phaniraj/WindowsLiveWriter/UsingthePHPToolkitwithAD.NETDataServices_143D1/Attach_DB_Step_1_2.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Attach_DB_Step_1" border="0" alt="Attach_DB_Step_1" src="http://blogs.msdn.com/blogfiles/phaniraj/WindowsLiveWriter/UsingthePHPToolkitwithAD.NETDataServices_143D1/Attach_DB_Step_1_thumb.png" width="240" height="160" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;4) In the “Attach Database” dialog , press “Add” and select the unzipped “VideoGameStore_Data.mdf” file.    &lt;br /&gt;You will notice that once you select the MDF file&amp;#160; , the dialog will complain about a missing .ldf file.     &lt;br /&gt;5) This is a routine warning , select the ldf file row in the dialog and press “Remove”     &lt;br /&gt;&amp;#160;&lt;a href="http://blogs.msdn.com/blogfiles/phaniraj/WindowsLiveWriter/UsingthePHPToolkitwithAD.NETDataServices_143D1/Attach_DB_Step_2_4.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Attach_DB_Step_2" border="0" alt="Attach_DB_Step_2" src="http://blogs.msdn.com/blogfiles/phaniraj/WindowsLiveWriter/UsingthePHPToolkitwithAD.NETDataServices_143D1/Attach_DB_Step_2_thumb_1.png" width="480" height="352" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;For the other database Northwind, you can use the sample database that are available from Download.Microsoft.com    &lt;br /&gt;Here’s a link to download the Northwind sample database : &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=06616212-0356-46A0-8DA2-EEBC53A68034&amp;amp;displaylang=en"&gt;Northwind and pubs Sample Databases for SQL Server 2000&lt;/a&gt;     &lt;br /&gt;Installation should be straight-forward as it comes with an MSI that is supposed to setup the database for you.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Disclaimer : I already had a copy of the Northwind database on my machine and didn’t use the installer above.      &lt;br /&gt;&lt;/strong&gt;&amp;#160; &lt;br /&gt;Once you have your databases setup , modify the respective connection strings web.config file from the ADODotNetDataServices project.&lt;/p&gt;  &lt;pre class="code"&gt;&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;connectionStrings&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;add &lt;/span&gt;&lt;span style="color: red"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;NorthwindEntities&lt;/span&gt;&amp;quot; &lt;br /&gt;         &lt;span style="color: red"&gt;connectionString&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;metadata=res://*/NorthwindModel.csdl|res://*/NorthwindModel.ssdl|res://*/NorthwindModel.msl;&lt;br /&gt;                           provider=System.Data.SqlClient;&lt;br /&gt;                           provider connection string=&lt;/span&gt;&lt;span style="color: red"&gt;&amp;amp;quot;&lt;/span&gt;&lt;span style="color: blue"&gt;&lt;strong&gt;YOURCONNECTIONSTRINGHERE&lt;/strong&gt;&lt;/span&gt;&lt;span style="color: red"&gt;&amp;amp;quot;&lt;/span&gt;&amp;quot; &lt;br /&gt;         &lt;span style="color: red"&gt;providerName&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;System.Data.EntityClient&lt;/span&gt;&amp;quot; &lt;span style="color: blue"&gt;/&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;add &lt;/span&gt;&lt;span style="color: red"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;VideoGameStoreEntities&lt;/span&gt;&amp;quot; &lt;br /&gt;         &lt;span style="color: red"&gt;connectionString&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;metadata=res://*/VideoGameStoreModel.csdl|res://*/VideoGameStoreModel.ssdl|res://*/VideoGameStoreModel.msl;&lt;br /&gt;                           provider=System.Data.SqlClient;&lt;br /&gt;                           provider connection string=&lt;/span&gt;&lt;span style="color: red"&gt;&amp;amp;quot;&lt;strong&gt;YOURCONNECTIONSTRINGHERE&lt;/strong&gt;&lt;/span&gt;&lt;span style="color: red"&gt;&lt;strong&gt;&amp;amp;&lt;/strong&gt;quot;&lt;/span&gt;&amp;quot; &lt;br /&gt;         &lt;span style="color: red"&gt;providerName&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;System.Data.EntityClient&lt;/span&gt;&amp;quot; &lt;span style="color: blue"&gt;/&amp;gt;
&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;connectionStrings&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: blue"&gt;&lt;/span&gt;&lt;/pre&gt;

&lt;ol&gt;
  &lt;li&gt;Once you have the database and the Data Service setup, then configure the project to only run on the URL that the PHP Samples expect to find the Data Service on. 
    &lt;br /&gt;To do this : 

    &lt;br /&gt;In Visual Studio,Go to the properties of the Project. &lt;/li&gt;

  &lt;li&gt;Click on the “Web” Tab in the left-hand pane. &lt;/li&gt;

  &lt;li&gt;Under the “Servers” section , Select the “Specific Port”&amp;#160; option and enter “8080” for the port number. 
    &lt;br /&gt;&lt;a href="http://blogs.msdn.com/blogfiles/phaniraj/WindowsLiveWriter/UsingthePHPToolkitwithAD.NETDataServices_143D1/Setup_DataService_Select_Port.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Setup_DataService_Select_Port" border="0" alt="Setup_DataService_Select_Port" src="http://blogs.msdn.com/blogfiles/phaniraj/WindowsLiveWriter/UsingthePHPToolkitwithAD.NETDataServices_143D1/Setup_DataService_Select_Port_thumb.png" width="640" height="205" /&gt;&lt;/a&gt; &lt;/li&gt;

  &lt;li&gt;
    &lt;p&gt;Now, run the project in Visual studio and launch the PHP samples by browsing to the Index.php page 
      &lt;br /&gt;in the PHPSamples virtual directory.&lt;/p&gt;
  &lt;/li&gt;
&lt;/ol&gt;
&lt;a name="Step5"&gt;
  &lt;h3&gt;PHP Sample Applications Walkthrough&lt;/h3&gt;
&lt;/a&gt;

&lt;p&gt;You should see this as the startup page when you run the PHP Samples 
  &lt;br /&gt;&lt;a href="http://blogs.msdn.com/blogfiles/phaniraj/WindowsLiveWriter/UsingthePHPToolkitwithAD.NETDataServices_143D1/PHP_SAMPles_Screen1.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="PHP_SAMPles_Screen1" border="0" alt="PHP_SAMPles_Screen1" src="http://blogs.msdn.com/blogfiles/phaniraj/WindowsLiveWriter/UsingthePHPToolkitwithAD.NETDataServices_143D1/PHP_SAMPles_Screen1_thumb.png" width="640" height="415" /&gt;&lt;/a&gt; 

  &lt;br /&gt;&lt;strong&gt;Demo&lt;/strong&gt; tab contents 

  &lt;br /&gt;&lt;a href="http://blogs.msdn.com/blogfiles/phaniraj/WindowsLiveWriter/UsingthePHPToolkitwithAD.NETDataServices_143D1/PHP_SAMPles_Screen_Samples1.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="PHP_SAMPles_Screen_Samples1" border="0" alt="PHP_SAMPles_Screen_Samples1" src="http://blogs.msdn.com/blogfiles/phaniraj/WindowsLiveWriter/UsingthePHPToolkitwithAD.NETDataServices_143D1/PHP_SAMPles_Screen_Samples1_thumb.png" width="640" height="370" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Select the ADO.NET Data Services Editor Sample to see some pure PHP awesomeness 
  &lt;br /&gt;&lt;a href="http://blogs.msdn.com/blogfiles/phaniraj/WindowsLiveWriter/UsingthePHPToolkitwithAD.NETDataServices_143D1/PHP_SAMPles_Screen2.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="PHP_SAMPles_Screen2" border="0" alt="PHP_SAMPles_Screen2" src="http://blogs.msdn.com/blogfiles/phaniraj/WindowsLiveWriter/UsingthePHPToolkitwithAD.NETDataServices_143D1/PHP_SAMPles_Screen2_thumb.png" width="640" height="209" /&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;Here’s an editor page for the Customers Entity Set: 
  &lt;br /&gt;&lt;a href="http://blogs.msdn.com/blogfiles/phaniraj/WindowsLiveWriter/UsingthePHPToolkitwithAD.NETDataServices_143D1/Customers_Edit_Screen.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Customers_Edit_Screen" border="0" alt="Customers_Edit_Screen" src="http://blogs.msdn.com/blogfiles/phaniraj/WindowsLiveWriter/UsingthePHPToolkitwithAD.NETDataServices_143D1/Customers_Edit_Screen_thumb.png" width="640" height="195" /&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;See that little text box over there ? 
  &lt;br /&gt;Yeah , it allows me to enter the Astoria URI operators like top , skip , filter to filter the rows bound to the grid below. 

  &lt;br /&gt;&lt;strong&gt;The gird is editable too &lt;/strong&gt;, Clicking on the “Detail” link in the first column of the grid brings up an editor for the customers 

  &lt;br /&gt;entity that was selected. 

  &lt;br /&gt;&lt;a href="http://blogs.msdn.com/blogfiles/phaniraj/WindowsLiveWriter/UsingthePHPToolkitwithAD.NETDataServices_143D1/Customers_Edit_Screen_2.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Customers_Edit_Screen_2" border="0" alt="Customers_Edit_Screen_2" src="http://blogs.msdn.com/blogfiles/phaniraj/WindowsLiveWriter/UsingthePHPToolkitwithAD.NETDataServices_143D1/Customers_Edit_Screen_2_thumb.png" width="640" height="312" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So , there you have it , instructions to setup the samples and some tours of the sample applications. 
  &lt;br /&gt;Since I know next to nothing about PHP , I have a few questions for our PHP-Savvy users.&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Which application framework(s) do you use&amp;#160; to build PHP applications? I know about CAKE and ZEND , any others? &lt;/li&gt;

  &lt;li&gt;Do you use a specific Validation framework or do you use the one that came with the&amp;#160; application framework? &lt;/li&gt;
&lt;/ol&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9892837" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/msdn/nbTP/~4/ymGdHyOwQdU" height="1" width="1"/&gt;</content><author><name>PhaniRajuYN</name><uri>http://blogs.msdn.com/members/PhaniRajuYN.aspx</uri></author><category term="Astoria" scheme="http://blogs.msdn.com/phaniraj/archive/tags/Astoria/default.aspx" /><category term="Demo" scheme="http://blogs.msdn.com/phaniraj/archive/tags/Demo/default.aspx" /><category term="Documentation" scheme="http://blogs.msdn.com/phaniraj/archive/tags/Documentation/default.aspx" /><category term="Php" scheme="http://blogs.msdn.com/phaniraj/archive/tags/Php/default.aspx" /><feedburner:origLink>http://blogs.msdn.com/phaniraj/archive/2009/09/08/using-the-php-toolkit-with-ado-net-data-services.aspx</feedburner:origLink></entry><entry><title>ADO.NET Data Services SL Client Library - XDomain and Out Of Browser</title><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/msdn/nbTP/~3/XDEcWpaYP7w/ado-net-data-services-sl-client-library-xdomain-and-out-of-browser.aspx" /><id>http://blogs.msdn.com/phaniraj/archive/2009/09/04/ado-net-data-services-sl-client-library-xdomain-and-out-of-browser.aspx</id><published>2009-09-04T05:32:00Z</published><updated>2009-09-04T05:32:00Z</updated><content type="html">&lt;P&gt;The first in my two part blog posts about&amp;nbsp;the new Silverlight Client Library we released in CTP2 is up on the team blog.&lt;/P&gt;
&lt;P&gt;&lt;SPAN class=entrylistheader&gt;&lt;A id=bp___v___r___postlist___EntryItems_ctl01_PostTitle href="http://blogs.msdn.com/astoriateam/archive/2009/09/03/using-the-ado-net-data-services-silverlight-client-in-x-domain-and-out-of-browser-scenarios-i.aspx" mce_href="http://blogs.msdn.com/astoriateam/archive/2009/09/03/using-the-ado-net-data-services-silverlight-client-in-x-domain-and-out-of-browser-scenarios-i.aspx"&gt;Using the ADO.NET Data Services Silverlight client in x-domain and out of browser scenarios – I&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class=entrylistheader&gt;Stay tuned to the team blog for the the second&amp;nbsp; part which talks about using the client library X-Domain and Out Of Browser&lt;BR&gt;to access a data service which is authenticated with Forms Authentication.&lt;/SPAN&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9891182" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/msdn/nbTP/~4/XDEcWpaYP7w" height="1" width="1"/&gt;</content><author><name>PhaniRajuYN</name><uri>http://blogs.msdn.com/members/PhaniRajuYN.aspx</uri></author><category term="Astoria" scheme="http://blogs.msdn.com/phaniraj/archive/tags/Astoria/default.aspx" /><category term="CrossDomain" scheme="http://blogs.msdn.com/phaniraj/archive/tags/CrossDomain/default.aspx" /><category term="Silverlight" scheme="http://blogs.msdn.com/phaniraj/archive/tags/Silverlight/default.aspx" /><category term="DataServiceContext" scheme="http://blogs.msdn.com/phaniraj/archive/tags/DataServiceContext/default.aspx" /><feedburner:origLink>http://blogs.msdn.com/phaniraj/archive/2009/09/04/ado-net-data-services-sl-client-library-xdomain-and-out-of-browser.aspx</feedburner:origLink></entry><entry><title>Its ALIVE !!! ADO.NET Data Services V1.5 CTP 2 is now in the wild!!</title><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/msdn/nbTP/~3/KhIo84nVAHc/its-alive-ado-net-data-services-v1-5-ctp-2-is-now-in-the-wild.aspx" /><id>http://blogs.msdn.com/phaniraj/archive/2009/08/31/its-alive-ado-net-data-services-v1-5-ctp-2-is-now-in-the-wild.aspx</id><published>2009-09-01T01:17:00Z</published><updated>2009-09-01T01:17:00Z</updated><content type="html">&lt;P&gt;Announcement on the team blog : &lt;/P&gt;
&lt;P&gt;&lt;A title=http://blogs.msdn.com/astoriateam/archive/2009/08/31/ado-net-data-services-v1-5-ctp2-now-available-for-download.aspx href="http://blogs.msdn.com/astoriateam/archive/2009/08/31/ado-net-data-services-v1-5-ctp2-now-available-for-download.aspx" mce_href="http://blogs.msdn.com/astoriateam/archive/2009/08/31/ado-net-data-services-v1-5-ctp2-now-available-for-download.aspx"&gt;http://blogs.msdn.com/astoriateam/archive/2009/08/31/ado-net-data-services-v1-5-ctp2-now-available-for-download.aspx&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Download the bits here : &lt;/P&gt;
&lt;P&gt;&lt;A title=http://www.microsoft.com/downloads/details.aspx?FamilyID=a71060eb-454e-4475-81a6-e9552b1034fc&amp;amp;displaylang=en href="http://www.microsoft.com/downloads/details.aspx?FamilyID=a71060eb-454e-4475-81a6-e9552b1034fc&amp;amp;displaylang=en" mce_href="http://www.microsoft.com/downloads/details.aspx?FamilyID=a71060eb-454e-4475-81a6-e9552b1034fc&amp;amp;displaylang=en"&gt;http://www.microsoft.com/downloads/details.aspx?FamilyID=a71060eb-454e-4475-81a6-e9552b1034fc&amp;amp;displaylang=en&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;I’ve also updated my blog posts about using the Friendly Feeds features here : &lt;BR&gt;&lt;BR&gt;&lt;A href="http://blogs.msdn.com/phaniraj/archive/2009/08/31/introducing-web-friendly-feeds-aka-friendly-feeds-updated-for-ctp2.aspx" mce_href="http://blogs.msdn.com/phaniraj/archive/2009/08/31/introducing-web-friendly-feeds-aka-friendly-feeds-updated-for-ctp2.aspx"&gt;Introducing Web Friendly Feeds aka Friendly Feeds (Updated for CTP2)&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/phaniraj/archive/2009/03/28/ado-net-data-services-friendly-feeds-mapping-edm-types-i.aspx" mce_href="http://blogs.msdn.com/phaniraj/archive/2009/03/28/ado-net-data-services-friendly-feeds-mapping-edm-types-i.aspx"&gt;ADO.NET Data Services Friendly Feeds , Mapping EDM Types – I&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/phaniraj/archive/2009/03/21/ado-net-data-services-friendly-feeds-mapping-clr-types.aspx" mce_href="http://blogs.msdn.com/phaniraj/archive/2009/03/21/ado-net-data-services-friendly-feeds-mapping-clr-types.aspx"&gt;ADO.NET Data Services Friendly Feeds , Mapping CLR Types&lt;/A&gt;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;Look forward to more exciting blog posts on the team blog about some of the new features in our CTP2 release .&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9889587" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/msdn/nbTP/~4/KhIo84nVAHc" height="1" width="1"/&gt;</content><author><name>PhaniRajuYN</name><uri>http://blogs.msdn.com/members/PhaniRajuYN.aspx</uri></author><feedburner:origLink>http://blogs.msdn.com/phaniraj/archive/2009/08/31/its-alive-ado-net-data-services-v1-5-ctp-2-is-now-in-the-wild.aspx</feedburner:origLink></entry><entry><title>Introducing Web Friendly Feeds aka Friendly Feeds (Updated for CTP2)</title><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/msdn/nbTP/~3/YYFw1gkFxXM/introducing-web-friendly-feeds-aka-friendly-feeds-updated-for-ctp2.aspx" /><id>http://blogs.msdn.com/phaniraj/archive/2009/08/31/introducing-web-friendly-feeds-aka-friendly-feeds-updated-for-ctp2.aspx</id><published>2009-09-01T00:53:13Z</published><updated>2009-09-01T00:53:13Z</updated><content type="html">&lt;p&gt;Hello all , with the recent release of ADO.NET Data v1.5 Services CTP 1 , we introduced a new feature called as “Web Friendly Feeds”.    &lt;br /&gt;With the release of CTP2 , we have introduced support for 2 additional ATOM:Entry elements you can map to:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;entry:Summary &lt;/li&gt;    &lt;li&gt;entry:Updated &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;&lt;strong&gt;What is this feature about ?&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;This is what the markup for one of the the resources of Customers looks like in ADO.NET Data Services v1 .&lt;/p&gt;  &lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;?&lt;/span&gt;&lt;span class="html"&gt;xml&lt;/span&gt; &lt;span class="attr"&gt;version&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;1.0&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;encoding&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;utf-8&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;standalone&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;yes&amp;quot;&lt;/span&gt; ?&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; 
&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;entry&lt;/span&gt; 
&lt;span class="attr"&gt;xml:base&lt;/span&gt;&lt;span class="kwrd"&gt;=&lt;a href="http://localhost:26503/northwind.svc/" mce_href="http://localhost:26503/northwind.svc/"&gt;http://localhost:26503/northwind.svc/&lt;/a&gt;&lt;/span&gt; &lt;br /&gt;&lt;span class="attr"&gt;&lt;br /&gt;xmlns:d&lt;/span&gt;&lt;span class="kwrd"&gt;=&lt;a href="http://schemas.microsoft.com/ado/2007/08/dataservices" mce_href="http://schemas.microsoft.com/ado/2007/08/dataservices"&gt;http://schemas.microsoft.com/ado/2007/08/dataservices&lt;/a&gt;&lt;/span&gt; &lt;br /&gt;&lt;span class="attr"&gt;xmlns:m&lt;/span&gt;&lt;span class="kwrd"&gt;=&lt;a href="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" mce_href="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"&gt;http://schemas.microsoft.com/ado/2007/08/dataservices/metadata&lt;/a&gt;&lt;/span&gt; &lt;br /&gt;&lt;span class="attr"&gt;xmlns&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;http://www.w3.org/2005/Atom&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;id&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;http://localhost:26503/northwind.svc/Customers('ALFKI')&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;id&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; 
  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;title&lt;/span&gt; &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;text&amp;quot;&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt; 
  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;updated&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;2009-03-18T20:30:20Z&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;updated&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; 
  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;author&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;name&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt; 
  &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;author&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
 &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;category&lt;/span&gt; &lt;span class="attr"&gt;term&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;NorthwindModel.Customers&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;scheme&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;http://schemas.microsoft.com/ado/2007/08/dataservices/scheme&amp;quot;&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt; 
 &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;content&lt;/span&gt; &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;application/xml&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
 &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;m:properties&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;d:CustomerID&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;ALFKI&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;d:CustomerID&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; 
  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;d:CompanyName&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Alfreds Futterkiste&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;d:CompanyName&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; 
  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;d:ContactName&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Maria Anders&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;d:ContactName&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; 
  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;d:ContactTitle&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Sales Representative&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;d:ContactTitle&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; 
  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;d:Address&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Obere Str. 57&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;d:Address&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; 
  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;d:City&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Berlin&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;d:City&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; 
  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;d:Region&lt;/span&gt; &lt;span class="attr"&gt;m:null&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;true&amp;quot;&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt; 
  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;d:PostalCode&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;12209&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;d:PostalCode&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; 
  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;d:Country&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Germany&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;d:Country&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; 
  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;d:Phone&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;030-0074321&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;d:Phone&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; 
  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;d:Fax&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;030-0076545&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;d:Fax&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; 
  &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;m:properties&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;content&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;entry&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;style type="text/css"&gt;




















.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;

&lt;p&gt;In the markup above , a couple of things are missing &lt;/p&gt;

&lt;p&gt;1) The &amp;lt;title&amp;gt; element is empty &lt;/p&gt;

&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;title&lt;/span&gt; &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;text&amp;quot;&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;2) The author/name element is empty &lt;/p&gt;

&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;author&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;name&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt; 
&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;author&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
In v 1.5 , through Friendly Feeds , we will now be able to assign a property of the “Customers” entity type to turn up in these element locations in the atom:entry payload. 

&lt;p&gt;Now , let’s say that we wanted to map the “ContactName” as the author name element of the entry element and Title to be “ContactTitle” as the title of the entry element. 
  &lt;br /&gt;Then , the payload would look like this : 

  &lt;br /&gt;&lt;/p&gt;

&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;entry&lt;/span&gt; &lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;id&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;http://localhost:26503/northwind.svc/Customers('ALFKI')&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;id&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; 
  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;title&lt;/span&gt; &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;text&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Sales Representative&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;title&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; 
  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;updated&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;2009-03-18T20:46:42Z&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;updated&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; 
 &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;author&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;name&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Maria Anders&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;name&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; 
  &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;author&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;category&lt;/span&gt; &lt;span class="attr"&gt;term&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;NorthwindModel.Customers&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;scheme&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;http://schemas.microsoft.com/ado/2007/08/dataservices/scheme&amp;quot;&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt; 
 &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;content&lt;/span&gt; &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;application/xml&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
 &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;m:properties&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;d:CustomerID&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;ALFKI&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;d:CustomerID&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; 
  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;d:CompanyName&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Alfreds Futterkiste&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;d:CompanyName&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; 
  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;d:ContactName&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Maria Anders&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;d:ContactName&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; 
  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;d:ContactTitle&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Sales Representative&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;d:ContactTitle&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; 
  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;d:Address&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Obere Str. 57&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;d:Address&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; 
  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;d:City&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Berlin&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;d:City&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; 
  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;d:Region&lt;/span&gt; &lt;span class="attr"&gt;m:null&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;true&amp;quot;&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt; 
  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;d:PostalCode&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;12209&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;d:PostalCode&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; 
  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;d:Country&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Germany&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;d:Country&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; 
  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;d:Phone&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;030-0074321&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;d:Phone&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; 
  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;d:Fax&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;030-0076545&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;d:Fax&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; 
  &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;m:properties&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;content&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;entry&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;This also means , that IE now displays the Title &amp;amp; author Name elements when you browse to the “Customers” entity set .&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/phaniraj/WindowsLiveWriter/IntroducingWebFriendlyFeeds_BB40/AStoria_Feed_Reading_View.png" mce_href="http://blogs.msdn.com/blogfiles/phaniraj/WindowsLiveWriter/IntroducingWebFriendlyFeeds_BB40/AStoria_Feed_Reading_View.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="AStoria_Feed_Reading_View" border="0" alt="AStoria_Feed_Reading_View" src="http://blogs.msdn.com/blogfiles/phaniraj/WindowsLiveWriter/IntroducingWebFriendlyFeeds_BB40/AStoria_Feed_Reading_View_thumb.png" width="644" height="322" mce_src="http://blogs.msdn.com/blogfiles/phaniraj/WindowsLiveWriter/IntroducingWebFriendlyFeeds_BB40/AStoria_Feed_Reading_View_thumb.png" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Which elements in the atom:entry element can I map to an entity type properties ?&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;entry:author/email &lt;/li&gt;

  &lt;li&gt;entry:author/name &lt;/li&gt;

  &lt;li&gt;entry:author/uri &lt;/li&gt;

  &lt;li&gt;entry:published &lt;/li&gt;

  &lt;li&gt;entry:rights &lt;/li&gt;

  &lt;li&gt;entry:summary &lt;/li&gt;

  &lt;li&gt;entry:title &lt;/li&gt;

  &lt;li&gt;entry:updated &lt;/li&gt;

  &lt;li&gt;entry:summary &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Once a property is mapped , if keeping the value of the property&amp;#160; in the entry:contents section doesn’t make sense,can I remove it ? 
    &lt;br /&gt;&lt;/strong&gt;Yes , absolutely , in the above case , we can remove the ContactName &amp;amp; ContactTitle elements from being repeated in the &amp;lt;contents&amp;gt; section. 

  &lt;br /&gt;Ex:&lt;/p&gt;

&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;entry&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;id&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;http://localhost:26503/northwind.svc/Customers('ALFKI')&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;id&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; 
  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;title&lt;/span&gt; &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;text&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Sales Representative&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;title&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; 
  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;updated&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;2009-03-18T21:04:20Z&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;updated&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; 
  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;author&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;name&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Maria Anders&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;name&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; 
  &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;author&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;category&lt;/span&gt; &lt;span class="attr"&gt;term&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;NorthwindModel.Customers&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;scheme&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;http://schemas.microsoft.com/ado/2007/08/dataservices/scheme&amp;quot;&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt; 
 &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;content&lt;/span&gt; &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;application/xml&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
 &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;m:properties&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;d:CustomerID&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;ALFKI&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;d:CustomerID&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; 
  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;d:CompanyName&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Alfreds Futterkiste&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;d:CompanyName&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; 
  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;d:Address&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Obere Str. 57&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;d:Address&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; 
  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;d:City&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Berlin&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;d:City&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; 
  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;d:Region&lt;/span&gt; &lt;span class="attr"&gt;m:null&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;true&amp;quot;&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt; 
  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;d:PostalCode&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;12209&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;d:PostalCode&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; 
  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;d:Country&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Germany&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;d:Country&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; 
  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;d:Phone&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;030-0074321&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;d:Phone&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; 
  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;d:Fax&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;030-0076545&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;d:Fax&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; 
  &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;m:properties&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;content&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;entry&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;&lt;strong&gt;Great , what else can I do with this new feature ? 
    &lt;br /&gt;&lt;/strong&gt;Well, did I mention you can &lt;font size="4"&gt;embed your own markup in the &amp;lt;entry&amp;gt; element for an entity type !!!&lt;/font&gt;&lt;/p&gt;

&lt;p&gt;consider the following entity type , BlogPost , which looks like this &lt;/p&gt;

&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;public class &lt;/span&gt;&lt;span style="color: #2b91af"&gt;BlogPost &lt;/span&gt;{
        &lt;span style="color: blue"&gt;public double &lt;/span&gt;Lat { &lt;span style="color: blue"&gt;get&lt;/span&gt;; &lt;span style="color: blue"&gt;set&lt;/span&gt;; }
        &lt;span style="color: blue"&gt;public double &lt;/span&gt;Long { &lt;span style="color: blue"&gt;get&lt;/span&gt;; &lt;span style="color: blue"&gt;set&lt;/span&gt;; }
        &lt;span style="color: blue"&gt;public int &lt;/span&gt;BlogPostID { &lt;span style="color: blue"&gt;get&lt;/span&gt;; &lt;span style="color: blue"&gt;set&lt;/span&gt;; }
        &lt;span style="color: blue"&gt;public string &lt;/span&gt;Title { &lt;span style="color: blue"&gt;get&lt;/span&gt;; &lt;span style="color: blue"&gt;set&lt;/span&gt;; }
        &lt;span style="color: blue"&gt;public string &lt;/span&gt;Body { &lt;span style="color: blue"&gt;get&lt;/span&gt;; &lt;span style="color: blue"&gt;set&lt;/span&gt;; }
        &lt;span style="color: blue"&gt;public string &lt;/span&gt;Author { &lt;span style="color: blue"&gt;get&lt;/span&gt;; &lt;span style="color: blue"&gt;set&lt;/span&gt;; }
        &lt;span style="color: blue"&gt;public string &lt;/span&gt;PostURI { &lt;span style="color: blue"&gt;get&lt;/span&gt;; &lt;span style="color: blue"&gt;set&lt;/span&gt;; }
        &lt;span style="color: blue"&gt;public string &lt;/span&gt;ContentSummary{get;set;}
}&lt;/pre&gt;

&lt;p&gt;This type represents the entry for a blog post , and also contains the Geographical location information about where the post was made ( Lat /Long) 
  &lt;br /&gt;and also the author information. Now , if this data was exposed via a Data Service, the payload would contain the Lat/Long/Published fields as part of&amp;#160; &lt;br /&gt;the entry:content element and wouldn’t have any special meaning. 

  &lt;br /&gt;The author element should be the Author field of the atom:entry , and the Published field to be the atom:published. 

  &lt;br /&gt;the Lat &amp;amp; Long fields should be a georss element that shows the location at which the Blog Post was made. 

  &lt;br /&gt;In short , it should look like this :&lt;/p&gt;

&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;entry&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;id&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;http://localhost/AstoriaBoard/Services/BlogSvc.svc/Posts(1)&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;id&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; 
  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;title&lt;/span&gt; &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;text&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Entities, How many ways do I count thee ?&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;title&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; 
  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;summary&lt;/span&gt; &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;html&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;br /&gt;          &amp;lt;&lt;/span&gt;&lt;span class="html"&gt;img&lt;/span&gt; &lt;span class="attr"&gt;class&lt;/span&gt;&lt;span class="kwrd"&gt;='imgClass'&lt;/span&gt; &lt;span class="attr"&gt;width&lt;/span&gt;&lt;span class="kwrd"&gt;='150px'&lt;/span&gt; &lt;span class="attr"&gt;height&lt;/span&gt;&lt;span class="kwrd"&gt;='150px'&lt;/span&gt; &lt;span class="attr"&gt;src&lt;/span&gt;&lt;span class="kwrd"&gt;='/AStoriaBoard/mug.jpg'&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;br&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;Its a common ask that we introduce aggregatin&lt;br /&gt;   &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;summary&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; 
  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;published&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;2009-03-18T14:29:43-07:00&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;published&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; 
  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;updated&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;2009-03-18T21:29:43Z&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;updated&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; 
 &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;author&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;name&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Phani Raj&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;name&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; 
  &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;author&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;link&lt;/span&gt; &lt;span class="attr"&gt;rel&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;edit&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;title&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;BlogPost&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;href&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Posts(1)&amp;quot;&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt; 
  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;category&lt;/span&gt; &lt;span class="attr"&gt;term&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Blogs.BlogPost&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;scheme&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;http://schemas.microsoft.com/ado/2007/08/dataservices/scheme&amp;quot;&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt; 
 &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;content&lt;/span&gt; &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;application/xml&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
 &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;m:properties&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;d:BlogPostID&lt;/span&gt; &lt;span class="attr"&gt;m:type&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Edm.Int32&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;1&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;d:BlogPostID&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; 
  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;d:Body&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Its a common ask that we introduce aggregating mechanisms in Data services &lt;br /&gt;          so that one can do a Count of the number of entities present in an EntitySet easily. &lt;br /&gt;          In this blog post , I will outline one method of implementing a “Count” method that works for you. &lt;br /&gt;          The interface to the count method will be&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;d:Body&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; 
  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;d:Author&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Phani Raj&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;d:Author&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; 
  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;d:PostURI&lt;/span&gt; &lt;span class="attr"&gt;m:null&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;true&amp;quot;&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt; 
  &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;m:properties&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;content&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
 &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;geo&lt;/span&gt; &lt;span class="attr"&gt;xmlns&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;http://www.georss.org/georss&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
   &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;long&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;-80.244445&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;long&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; 
   &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;lat&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;25.730752&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;lat&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; 
 &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;geo&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
 &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;entry&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;Now that we got this markup , I feel like we should do something with it . How about showing this information on a MAP ? 
  &lt;br /&gt;I know !! We have a mapping solution , Virtual Earth , lets try and see if we can feed this feed to Virtual Earth and make it see our GeoRss markup. 

  &lt;br /&gt;Recently , ( November 2008 ), the Live team released the Map control as an asp.net control . Download it here :&lt;a title="http://dev.live.com/tools/" href="http://dev.live.com/tools/" mce_href="http://dev.live.com/tools/"&gt;http://dev.live.com/tools/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Add this control to an aspx page in the same website as the Data Service .&lt;/p&gt;

&lt;pre class="code"&gt;&lt;span style="background: #ffee62"&gt;&amp;lt;%&lt;/span&gt;&lt;span style="color: blue"&gt;@ &lt;/span&gt;&lt;span style="color: #a31515"&gt;Page &lt;/span&gt;&lt;span style="color: red"&gt;Language&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;C#&amp;quot; &lt;/span&gt;&lt;span style="color: red"&gt;AutoEventWireup&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;true&amp;quot; &lt;/span&gt;&lt;span style="color: red"&gt;CodeFile&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;Default.aspx.cs&amp;quot; &lt;/span&gt;&lt;span style="color: red"&gt;Inherits&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;_Default&amp;quot; &lt;/span&gt;&lt;span style="background: #ffee62"&gt;%&amp;gt;

&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;lt;!&lt;/span&gt;&lt;span style="color: #a31515"&gt;DOCTYPE &lt;/span&gt;&lt;span style="color: red"&gt;html PUBLIC &lt;/span&gt;&lt;span style="color: blue"&gt;&amp;quot;-//W3C//DTD XHTML 1.0 Transitional//EN&amp;quot; &amp;quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&amp;quot;&amp;gt;
&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;html &lt;/span&gt;&lt;span style="color: red"&gt;xmlns&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;http://www.w3.org/1999/xhtml&amp;quot;&amp;gt;
&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;head &lt;/span&gt;&lt;span style="color: red"&gt;runat&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;server&amp;quot;&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;title&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;title&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;style&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
        &lt;/span&gt;&lt;span style="color: #a31515"&gt;.imgClass&lt;/span&gt;{
            &lt;span style="color: red"&gt;border&lt;/span&gt;: &lt;span style="color: blue"&gt;solid 2px #99ccff&lt;/span&gt;;}
    &lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;style&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;head&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;body&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;form &lt;/span&gt;&lt;span style="color: red"&gt;id&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;form1&amp;quot; &lt;/span&gt;&lt;span style="color: red"&gt;runat&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;server&amp;quot;&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;script &lt;/span&gt;&lt;span style="color: red"&gt;language&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;javascript&amp;quot;&amp;gt;
        function &lt;/span&gt;pageLoad() {
            HookUpWorkAround();
        }
    &lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;script&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;div &lt;/span&gt;&lt;span style="color: red"&gt;id&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;mapContainer&amp;quot;&amp;gt;
        &lt;strong&gt;&amp;lt;&lt;/strong&gt;&lt;/span&gt;&lt;strong&gt;&lt;span style="color: #a31515"&gt;ve&lt;/span&gt;&lt;span style="color: blue"&gt;:&lt;/span&gt;&lt;span style="color: #a31515"&gt;Map &lt;/span&gt;&lt;span style="color: red"&gt;ID&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;geoRssMap&amp;quot; &lt;/span&gt;&lt;span style="color: red"&gt;runat&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;server&amp;quot; &lt;/span&gt;&lt;span style="color: red"&gt;Height&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;600px&amp;quot; &lt;/span&gt;&lt;span style="color: red"&gt;Width&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;75%&amp;quot; &lt;/span&gt;&lt;span style="color: red"&gt;ZoomLevel&lt;/span&gt;&lt;/strong&gt;&lt;span style="color: blue"&gt;&lt;strong&gt;=&amp;quot;4&amp;quot; /&amp;gt;
&lt;/strong&gt;    &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;div&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;asp&lt;/span&gt;&lt;span style="color: blue"&gt;:&lt;/span&gt;&lt;span style="color: #a31515"&gt;ScriptManager &lt;/span&gt;&lt;span style="color: red"&gt;ID&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;scrpManager&amp;quot; &lt;/span&gt;&lt;span style="color: red"&gt;runat&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;server&amp;quot;&amp;gt;
        &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;Scripts&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
            &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;asp&lt;/span&gt;&lt;span style="color: blue"&gt;:&lt;/span&gt;&lt;span style="color: #a31515"&gt;ScriptReference &lt;/span&gt;&lt;span style="color: red"&gt;Path&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;~/Scripts/VEWorkAround.js&amp;quot; /&amp;gt;
        &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;Scripts&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
    &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;asp&lt;/span&gt;&lt;span style="color: blue"&gt;:&lt;/span&gt;&lt;span style="color: #a31515"&gt;ScriptManager&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
    &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;form&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;body&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;html&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;In the code-behind file , &lt;/p&gt;

&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;using &lt;/span&gt;System;
&lt;span style="color: blue"&gt;using &lt;/span&gt;Microsoft.Live.ServerControls.VE;

&lt;span style="color: blue"&gt;public partial class &lt;/span&gt;&lt;span style="color: #2b91af"&gt;_Default &lt;/span&gt;: System.Web.UI.&lt;span style="color: #2b91af"&gt;Page
&lt;/span&gt;{
    &lt;span style="color: blue"&gt;protected void &lt;/span&gt;Page_Load(&lt;span style="color: blue"&gt;object &lt;/span&gt;sender, &lt;span style="color: #2b91af"&gt;EventArgs &lt;/span&gt;e)
    {
        &lt;span style="color: green"&gt;//Clear out any mapped locations 
        &lt;/span&gt;geoRssMap.Clear();
        &lt;span style="color: green"&gt;//Create a new shapelayer to import
        &lt;/span&gt;&lt;span style="color: #2b91af"&gt;ShapeLayer &lt;/span&gt;geoRssLayer = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;ShapeLayer&lt;/span&gt;();
        &lt;span style="color: green"&gt;//Point the shape layer at the data source returning the mapping information
        &lt;/span&gt;&lt;span style="color: #2b91af"&gt;ShapeSourceSpecification &lt;/span&gt;georssSpec = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;ShapeSourceSpecification&lt;/span&gt;(
                    &lt;span style="color: #2b91af"&gt;DataType&lt;/span&gt;.GeoRSS, &lt;span style="color: #a31515"&gt;&amp;quot;Services/BlogSvc.svc/Posts&amp;quot;&lt;/span&gt;, geoRssLayer
                    );
        &lt;span style="color: green"&gt;//Bind the feed to the map
        &lt;/span&gt;geoRssMap.ImportShapeLayerData(georssSpec, &lt;span style="color: blue"&gt;null&lt;/span&gt;, &lt;span style="color: blue"&gt;false&lt;/span&gt;);
    }
}&lt;/pre&gt;
&lt;a href="http://11011.net/software/vspaste" mce_href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;

&lt;p&gt;You might be wondering why we need the HookUpWorkAround() function and what it does , I’ll explain that in a later blog post . 
  &lt;br /&gt;After this , set the web page as the startup page and browse to the page in &lt;strong&gt;&lt;em&gt;&lt;u&gt;FireFox , &lt;/u&gt;&lt;/em&gt;&lt;/strong&gt;I’ll explain why Firefox in a later blog post . 

  &lt;br /&gt;And voila !! This is what the page looks like : 

  &lt;br /&gt;&lt;a href="http://blogs.msdn.com/blogfiles/phaniraj/WindowsLiveWriter/IntroducingWebFriendlyFeeds_BB40/FF_Ve_Firefox_2.png" mce_href="http://blogs.msdn.com/blogfiles/phaniraj/WindowsLiveWriter/IntroducingWebFriendlyFeeds_BB40/FF_Ve_Firefox_2.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="FF_Ve_Firefox" border="0" alt="FF_Ve_Firefox" src="http://blogs.msdn.com/blogfiles/phaniraj/WindowsLiveWriter/IntroducingWebFriendlyFeeds_BB40/FF_Ve_Firefox_thumb.png" width="613" height="484" mce_src="http://blogs.msdn.com/blogfiles/phaniraj/WindowsLiveWriter/IntroducingWebFriendlyFeeds_BB40/FF_Ve_Firefox_thumb.png" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can download the&amp;#160; sample project that demonstrates this feature by clicking on the link at the bottom of this post&lt;/p&gt;

&lt;p&gt;All this demonstrates the &lt;strong&gt;what &lt;/strong&gt;and not the &lt;strong&gt;how &lt;/strong&gt;, we shall discuss the &lt;strong&gt;how &lt;/strong&gt;in future blog posts.&lt;/p&gt;

&lt;p&gt;In the meantime ,enjoy this sample app and try out your own mashups.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9889569" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/msdn/nbTP/~4/YYFw1gkFxXM" height="1" width="1"/&gt;</content><author><name>PhaniRajuYN</name><uri>http://blogs.msdn.com/members/PhaniRajuYN.aspx</uri></author><feedburner:origLink>http://blogs.msdn.com/phaniraj/archive/2009/08/31/introducing-web-friendly-feeds-aka-friendly-feeds-updated-for-ctp2.aspx</feedburner:origLink></entry><entry><title>PhP and Astoria = PHASTORIA !!</title><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/msdn/nbTP/~3/1Zakg2DTYGE/php-and-astoria-phastoria.aspx" /><id>http://blogs.msdn.com/phaniraj/archive/2009/08/21/php-and-astoria-phastoria.aspx</id><published>2009-08-21T21:29:44Z</published><updated>2009-08-21T21:29:44Z</updated><content type="html">&lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/phaniraj/WindowsLiveWriter/PhPandAstoriaPHASTORIA_A1A6/Phastoria_2.jpg"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Phastoria" border="0" alt="Phastoria" src="http://blogs.msdn.com/blogfiles/phaniraj/WindowsLiveWriter/PhPandAstoriaPHASTORIA_A1A6/Phastoria_thumb.jpg" width="384" height="382" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;More details here : &lt;a href="http://blogs.msdn.com/astoriateam/archive/2009/08/21/announcing-the-php-toolkit-for-ado-net-data-services.aspx"&gt;Announcing the PHP Toolkit for ADO.NET Data Services&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Look forward to future posts on this blog about working with the PHP library and Astoria Services.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9879063" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/msdn/nbTP/~4/1Zakg2DTYGE" height="1" width="1"/&gt;</content><author><name>PhaniRajuYN</name><uri>http://blogs.msdn.com/members/PhaniRajuYN.aspx</uri></author><category term="Astoria" scheme="http://blogs.msdn.com/phaniraj/archive/tags/Astoria/default.aspx" /><category term="Php" scheme="http://blogs.msdn.com/phaniraj/archive/tags/Php/default.aspx" /><feedburner:origLink>http://blogs.msdn.com/phaniraj/archive/2009/08/21/php-and-astoria-phastoria.aspx</feedburner:origLink></entry><entry><title>Silverlight toolkit with ADO.NET Data services , Drill-down Charts using Astoria</title><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/msdn/nbTP/~3/y1BtC19tpNE/silverlight-toolkit-with-ado-net-data-services-drill-down-charts-using-astoria.aspx" /><id>http://blogs.msdn.com/phaniraj/archive/2009/06/11/silverlight-toolkit-with-ado-net-data-services-drill-down-charts-using-astoria.aspx</id><published>2009-06-11T10:12:51Z</published><updated>2009-06-11T10:12:51Z</updated><content type="html">&lt;p&gt;Download sample project here :&lt;/p&gt; &lt;iframe style="border-bottom: #dde5e9 1px solid; border-left: #dde5e9 1px solid; padding-bottom: 0px; background-color: #ffffff; margin: 3px; padding-left: 0px; width: 240px; padding-right: 0px; height: 26px; border-top: #dde5e9 1px solid; border-right: #dde5e9 1px solid; padding-top: 0px" marginheight="0" src="http://cid-925c2d2bb2d03c6b.skydrive.live.com/embedrow.aspx/SLToolkitAstoria/SLToolkitWithAstoria%7C_Chart%7C_DrillDown.zip" frameborder="0" marginwidth="0" scrolling="no"&gt;&lt;/iframe&gt;  &lt;p&gt;In part 2 of this series , we will look at using the Astoria client library to create a drill down chart using the chart types available in the Silverlight toolkit.    &lt;br /&gt;You can take a look at the complete samples for the Silverlight toolkit &lt;a href="http://www.codeplex.com/Silverlight/Wiki/View.aspx?title=Silverlight%20Toolkit%20Overview%20Part%202&amp;amp;referringTitle=Silverlight%20Toolkit%20Overview%20Part%201"&gt;here&lt;/a&gt;.     &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;This sample builds a UI that looks like this :&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/phaniraj/WindowsLiveWriter/Silverlighttoolk.NETDataservicesCharting_1428C/ChartDrillDownAstoria_2.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="ChartDrillDownAstoria_2" border="0" alt="ChartDrillDownAstoria_2" src="http://blogs.msdn.com/blogfiles/phaniraj/WindowsLiveWriter/Silverlighttoolk.NETDataservicesCharting_1428C/ChartDrillDownAstoria_2_thumb.png" width="462" height="474" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;The Pie chart represents the distribution of Employees across departments.    &lt;br /&gt;Clicking on a specific piece of the pie&amp;#160; brings up the list of the employees in that department.     &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Binding the Pie chart      &lt;br /&gt;&lt;/strong&gt;The Chart control has a Pie series that has the DependentValuePath set to the Count of employees in the department     &lt;br /&gt;and the IndependentValuePath set to the name of the department.&lt;/p&gt;  &lt;p&gt;Setting the IndependentValuePath is straightforward ,set the IndependentValuePath to the “DepartMentName” property of the Department entity type. The DependentValuePath is a little tricky , as the Department entity doesnt contain aggregation information regarding the employees in the Department . But , it does have the employees as an ObservableCollection of Employee types . So , we can get the count by assigning the DependentValuePath to be the expression “Employees.Count” which gets the Count property of the IList. Unfortunately ,&amp;#160; this means that the Employees will also have to be downloaded when you bind the Departments. In another post , I will discuss how to lazy load the employees list and still get this aggregation.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;XAML for Pie Series in Chart &lt;/strong&gt;&lt;/p&gt;  &lt;pre class="code"&gt;&lt;span style="background: #10100d; color: #a1b070"&gt;  &amp;lt;&lt;/span&gt;&lt;span style="background: #10100d; color: #d6d694"&gt;chartingToolkit&lt;/span&gt;&lt;span style="background: #10100d; color: #a1b070"&gt;:&lt;/span&gt;&lt;span style="background: #10100d; color: #d6d694"&gt;Chart &lt;/span&gt;&lt;span style="background: #10100d; color: #009b00"&gt;x&lt;/span&gt;&lt;span style="background: #10100d; color: #a1b070"&gt;:&lt;/span&gt;&lt;span style="background: #10100d; color: #009b00"&gt;Name&lt;/span&gt;&lt;span style="background: #10100d; color: #a1b070"&gt;=&lt;/span&gt;&lt;span style="background: #10100d; color: #44b1e3"&gt;&amp;quot;chEmployeesByDepartment&amp;quot; &lt;br /&gt;       &lt;/span&gt;&lt;span style="background: #10100d; color: #009b00"&gt;Title&lt;/span&gt;&lt;span style="background: #10100d; color: #a1b070"&gt;=&lt;/span&gt;&lt;span style="background: #10100d; color: #44b1e3"&gt;&amp;quot;# Employees/Department&amp;quot; &lt;/span&gt;&lt;span style="background: #10100d; color: #009b00"&gt;IsEnabled&lt;/span&gt;&lt;span style="background: #10100d; color: #a1b070"&gt;=&lt;/span&gt;&lt;span style="background: #10100d; color: #44b1e3"&gt;&amp;quot;true&amp;quot; &lt;/span&gt;&lt;span style="background: #10100d; color: #009b00"&gt;Height&lt;/span&gt;&lt;span style="background: #10100d; color: #a1b070"&gt;=&lt;/span&gt;&lt;span style="background: #10100d; color: #44b1e3"&gt;&amp;quot;300&amp;quot;&lt;/span&gt;&lt;span style="background: #10100d; color: #a1b070"&gt;&amp;gt;
      &amp;lt;&lt;/span&gt;&lt;span style="background: #10100d; color: #d6d694"&gt;chartingToolkit&lt;/span&gt;&lt;span style="background: #10100d; color: #a1b070"&gt;:&lt;/span&gt;&lt;span style="background: #10100d; color: #d6d694"&gt;Chart.Series&lt;/span&gt;&lt;span style="background: #10100d; color: #a1b070"&gt;&amp;gt;
         &amp;lt;&lt;/span&gt;&lt;span style="background: #10100d; color: #d6d694"&gt;chartingToolkit&lt;/span&gt;&lt;span style="background: #10100d; color: #a1b070"&gt;:&lt;/span&gt;&lt;span style="background: #10100d; color: #d6d694"&gt;PieSeries    &lt;br /&gt;                &lt;/span&gt;&lt;span style="background: #10100d; color: #009b00"&gt;x&lt;/span&gt;&lt;span style="background: #10100d; color: #a1b070"&gt;:&lt;/span&gt;&lt;span style="background: #10100d; color: #009b00"&gt;Name&lt;/span&gt;&lt;span style="background: #10100d; color: #a1b070"&gt;=&lt;/span&gt;&lt;span style="background: #10100d; color: #44b1e3"&gt;&amp;quot;lnSeries&amp;quot;
                &lt;/span&gt;&lt;span style="background: #10100d; color: #009b00"&gt;IndependentValuePath &lt;/span&gt;&lt;span style="background: #10100d; color: #a1b070"&gt;=&lt;/span&gt;&lt;span style="background: #10100d; color: #44b1e3"&gt;&amp;quot;DepartMentName&amp;quot;
                &lt;/span&gt;&lt;span style="background: #10100d; color: #009b00"&gt;DependentValuePath &lt;/span&gt;&lt;span style="background: #10100d; color: #a1b070"&gt;=&lt;/span&gt;&lt;span style="background: #10100d; color: #44b1e3"&gt;&amp;quot;Employees.Count&amp;quot;
                &lt;/span&gt;&lt;span style="background: #10100d; color: #009b00"&gt;SelectionChanged&lt;/span&gt;&lt;span style="background: #10100d; color: #a1b070"&gt;=&lt;/span&gt;&lt;span style="background: #10100d; color: #44b1e3"&gt;&amp;quot;DepartmentSelected&amp;quot;
                &lt;/span&gt;&lt;span style="background: #10100d; color: #009b00"&gt;IsSelectionEnabled &lt;/span&gt;&lt;span style="background: #10100d; color: #a1b070"&gt;=&lt;/span&gt;&lt;span style="background: #10100d; color: #44b1e3"&gt;&amp;quot;True&amp;quot; &lt;/span&gt;&lt;span style="background: #10100d; color: #a1b070"&gt;&amp;gt;
         &amp;lt;/&lt;/span&gt;&lt;span style="background: #10100d; color: #d6d694"&gt;chartingToolkit&lt;/span&gt;&lt;span style="background: #10100d; color: #a1b070"&gt;:&lt;/span&gt;&lt;span style="background: #10100d; color: #d6d694"&gt;PieSeries&lt;/span&gt;&lt;span style="background: #10100d; color: #a1b070"&gt;&amp;gt;
      &amp;lt;/&lt;/span&gt;&lt;span style="background: #10100d; color: #d6d694"&gt;chartingToolkit&lt;/span&gt;&lt;span style="background: #10100d; color: #a1b070"&gt;:&lt;/span&gt;&lt;span style="background: #10100d; color: #d6d694"&gt;Chart.Series&lt;/span&gt;&lt;span style="background: #10100d; color: #a1b070"&gt;&amp;gt;
  &amp;lt;/&lt;/span&gt;&lt;span style="background: #10100d; color: #d6d694"&gt;chartingToolkit&lt;/span&gt;&lt;span style="background: #10100d; color: #a1b070"&gt;:&lt;/span&gt;&lt;span style="background: #10100d; color: #d6d694"&gt;Chart&lt;/span&gt;&lt;span style="background: #10100d; color: #a1b070"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;

&lt;p&gt;
  &lt;br /&gt;&lt;/p&gt;
&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;

&lt;p&gt;&lt;strong&gt;The function to bind the Pie series with the Department information&lt;/strong&gt;&lt;/p&gt;

&lt;pre class="code"&gt;&lt;span style="background: #10100d; color: #d6d694"&gt; private void &lt;/span&gt;&lt;span style="background: #10100d; color: #e8e8e8"&gt;LoadDepartmentsAndEmployees&lt;/span&gt;&lt;span style="background: #10100d; color: #a79a86"&gt;() {
    &lt;/span&gt;&lt;span style="background: #10100d; color: #009b00"&gt;DataServiceQuery&lt;/span&gt;&lt;span style="background: #10100d; color: #80ff00"&gt;&amp;lt;&lt;/span&gt;&lt;span style="background: #10100d; color: #009b00"&gt;Department&lt;/span&gt;&lt;span style="background: #10100d; color: #80ff00"&gt;&amp;gt; &lt;/span&gt;&lt;span style="background: #10100d; color: #e8e8e8"&gt;deptQueryWithEmployees &lt;/span&gt;&lt;span style="background: #10100d; color: #80ff00"&gt;= &lt;/span&gt;&lt;span style="background: #10100d; color: #e8e8e8"&gt;context&lt;/span&gt;&lt;span style="background: #10100d; color: #80ff00"&gt;.&lt;/span&gt;&lt;span style="background: #10100d; color: #e8e8e8"&gt;Departments&lt;/span&gt;&lt;span style="background: #10100d; color: #80ff00"&gt;.&lt;/span&gt;&lt;span style="background: #10100d; color: #e8e8e8"&gt;Expand&lt;/span&gt;&lt;span style="background: #10100d; color: #a79a86"&gt;(&lt;/span&gt;&lt;span style="background: #10100d; color: #44b1e3"&gt;&amp;quot;Employees&amp;quot;&lt;/span&gt;&lt;span style="background: #10100d; color: #a79a86"&gt;) &lt;br /&gt;                                 &lt;/span&gt;&lt;span style="background: #10100d; color: #d6d694"&gt;as &lt;/span&gt;&lt;span style="background: #10100d; color: #009b00"&gt;DataServiceQuery&lt;/span&gt;&lt;span style="background: #10100d; color: #80ff00"&gt;&amp;lt;&lt;/span&gt;&lt;span style="background: #10100d; color: #009b00"&gt;Department&lt;/span&gt;&lt;span style="background: #10100d; color: #80ff00"&gt;&amp;gt;&lt;/span&gt;&lt;span style="background: #10100d; color: #a79a86"&gt;;
    &lt;/span&gt;&lt;span style="background: #10100d; color: #e8e8e8"&gt;deptQueryWithEmployees&lt;/span&gt;&lt;span style="background: #10100d; color: #80ff00"&gt;.&lt;/span&gt;&lt;span style="background: #10100d; color: #e8e8e8"&gt;QueryAndCall&lt;/span&gt;&lt;span style="background: #10100d; color: #a79a86"&gt;(
       (&lt;/span&gt;&lt;span style="background: #10100d; color: #e8e8e8"&gt;deparmentStatistics&lt;/span&gt;&lt;span style="background: #10100d; color: #a79a86"&gt;) &lt;/span&gt;&lt;span style="background: #10100d; color: #80ff00"&gt;=&amp;gt;  &lt;/span&gt;&lt;span style="background: #10100d; color: #a79a86"&gt;{
          &lt;/span&gt;&lt;span style="background: #10100d; color: #e8e8e8"&gt;Dispatcher&lt;/span&gt;&lt;span style="background: #10100d; color: #80ff00"&gt;.&lt;/span&gt;&lt;span style="background: #10100d; color: #e8e8e8"&gt;BeginInvoke&lt;/span&gt;&lt;span style="background: #10100d; color: #a79a86"&gt;(
           () &lt;/span&gt;&lt;span style="background: #10100d; color: #80ff00"&gt;=&amp;gt;  &lt;/span&gt;&lt;span style="background: #10100d; color: #a79a86"&gt;{ 
                &lt;/span&gt;&lt;span style="background: #10100d; color: #009b00"&gt;PieSeries &lt;/span&gt;&lt;span style="background: #10100d; color: #e8e8e8"&gt;series &lt;/span&gt;&lt;span style="background: #10100d; color: #80ff00"&gt;= &lt;/span&gt;&lt;span style="background: #10100d; color: #e8e8e8"&gt;chEmployeesByDepartment&lt;/span&gt;&lt;span style="background: #10100d; color: #80ff00"&gt;.&lt;/span&gt;&lt;span style="background: #10100d; color: #e8e8e8"&gt;Series&lt;/span&gt;&lt;span style="background: #10100d; color: #a79a86"&gt;[&lt;/span&gt;&lt;span style="background: #10100d; color: cyan"&gt;0&lt;/span&gt;&lt;span style="background: #10100d; color: #a79a86"&gt;] &lt;/span&gt;&lt;span style="background: #10100d; color: #d6d694"&gt;as &lt;/span&gt;&lt;span style="background: #10100d; color: #009b00"&gt;PieSeries&lt;/span&gt;&lt;span style="background: #10100d; color: #a79a86"&gt;;
                &lt;/span&gt;&lt;span style="background: #10100d; color: #e8e8e8"&gt;series&lt;/span&gt;&lt;span style="background: #10100d; color: #80ff00"&gt;.&lt;/span&gt;&lt;span style="background: #10100d; color: #e8e8e8"&gt;ItemsSource &lt;/span&gt;&lt;span style="background: #10100d; color: #80ff00"&gt;= &lt;/span&gt;&lt;span style="background: #10100d; color: #e8e8e8"&gt;deparmentStatistics&lt;/span&gt;&lt;span style="background: #10100d; color: #a79a86"&gt;;
               }    
            );       
         }); }&lt;/span&gt;&lt;/pre&gt;
&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;

&lt;p&gt;&lt;strong&gt;Populating employee information when a department is selected in the Pie Series 
    &lt;br /&gt;&lt;/strong&gt;We need to setup the Pie Series in the chart control to allow selection of chart points&amp;#160; and hook into the 

  &lt;br /&gt;SelectionChanged event of the Pie Series. We do this by:&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Setting IsSelectionEnabled to true on the Pie Series &lt;/li&gt;

  &lt;li&gt;Hooking up to the SelectionChanged event of the Pie Series &lt;/li&gt;
&lt;/ol&gt;

&lt;pre class="code"&gt;&lt;span style="background: #10100d; color: #a79a86"&gt;        &lt;/span&gt;&lt;span style="background: #10100d; color: #d6d694"&gt;private void &lt;/span&gt;&lt;span style="background: #10100d; color: #e8e8e8"&gt;DepartmentSelected&lt;/span&gt;&lt;span style="background: #10100d; color: #a79a86"&gt;(&lt;/span&gt;&lt;span style="background: #10100d; color: #d6d694"&gt;object &lt;/span&gt;&lt;span style="background: #10100d; color: #e8e8e8"&gt;sender&lt;/span&gt;&lt;span style="background: #10100d; color: #a79a86"&gt;, &lt;/span&gt;&lt;span style="background: #10100d; color: #009b00"&gt;SelectionChangedEventArgs &lt;/span&gt;&lt;span style="background: #10100d; color: #e8e8e8"&gt;e&lt;/span&gt;&lt;span style="background: #10100d; color: #a79a86"&gt;) {  
            &lt;/span&gt;&lt;span style="background: #10100d; color: #ff0080"&gt;//Get the series that caused this  event to be raised
            &lt;/span&gt;&lt;span style="background: #10100d; color: #009b00"&gt;PieSeries &lt;/span&gt;&lt;span style="background: #10100d; color: #e8e8e8"&gt;series &lt;/span&gt;&lt;span style="background: #10100d; color: #80ff00"&gt;= &lt;/span&gt;&lt;span style="background: #10100d; color: #e8e8e8"&gt;sender &lt;/span&gt;&lt;span style="background: #10100d; color: #d6d694"&gt;as &lt;/span&gt;&lt;span style="background: #10100d; color: #009b00"&gt;PieSeries&lt;/span&gt;&lt;span style="background: #10100d; color: #a79a86"&gt;;
            &lt;/span&gt;&lt;span style="background: #10100d; color: #ff0080"&gt;//Get the current selected department in the Series
            &lt;/span&gt;&lt;span style="background: #10100d; color: #009b00"&gt;Department &lt;/span&gt;&lt;span style="background: #10100d; color: #e8e8e8"&gt;selectedDepartment &lt;/span&gt;&lt;span style="background: #10100d; color: #80ff00"&gt;= &lt;/span&gt;&lt;span style="background: #10100d; color: #e8e8e8"&gt;series&lt;/span&gt;&lt;span style="background: #10100d; color: #80ff00"&gt;.&lt;/span&gt;&lt;span style="background: #10100d; color: #e8e8e8"&gt;SelectedItem &lt;/span&gt;&lt;span style="background: #10100d; color: #d6d694"&gt;as &lt;/span&gt;&lt;span style="background: #10100d; color: #009b00"&gt;Department&lt;/span&gt;&lt;span style="background: #10100d; color: #a79a86"&gt;;
            &lt;/span&gt;&lt;span style="background: #10100d; color: #d6d694"&gt;if &lt;/span&gt;&lt;span style="background: #10100d; color: #a79a86"&gt;(&lt;/span&gt;&lt;span style="background: #10100d; color: #e8e8e8"&gt;selectedDepartment &lt;/span&gt;&lt;span style="background: #10100d; color: #80ff00"&gt;!= &lt;/span&gt;&lt;span style="background: #10100d; color: #d6d694"&gt;null&lt;/span&gt;&lt;span style="background: #10100d; color: #a79a86"&gt;) { 
                &lt;/span&gt;&lt;span style="background: #10100d; color: #ff0080"&gt;//Set the title of the data grid
                &lt;/span&gt;&lt;span style="background: #10100d; color: #e8e8e8"&gt;lblSelectedDepartment&lt;/span&gt;&lt;span style="background: #10100d; color: #80ff00"&gt;.&lt;/span&gt;&lt;span style="background: #10100d; color: #e8e8e8"&gt;Text &lt;/span&gt;&lt;span style="background: #10100d; color: #80ff00"&gt;= &lt;/span&gt;&lt;span style="background: #10100d; color: #009b00"&gt;String&lt;/span&gt;&lt;span style="background: #10100d; color: #80ff00"&gt;.&lt;/span&gt;&lt;span style="background: #10100d; color: #e8e8e8"&gt;Format&lt;/span&gt;&lt;span style="background: #10100d; color: #a79a86"&gt;(&lt;/span&gt;&lt;span style="background: #10100d; color: #e8e8e8"&gt;strSelectedDepartmentMessage&lt;/span&gt;&lt;span style="background: #10100d; color: #a79a86"&gt;, &lt;/span&gt;&lt;span style="background: #10100d; color: #e8e8e8"&gt;selectedDepartment&lt;/span&gt;&lt;span style="background: #10100d; color: #80ff00"&gt;.&lt;/span&gt;&lt;span style="background: #10100d; color: #e8e8e8"&gt;DepartMentName&lt;/span&gt;&lt;span style="background: #10100d; color: #a79a86"&gt;);
                &lt;/span&gt;&lt;span style="background: #10100d; color: #ff0080"&gt;//Bind the employee grid with the employees for this department
                &lt;/span&gt;&lt;span style="background: #10100d; color: #e8e8e8"&gt;dgEmployees&lt;/span&gt;&lt;span style="background: #10100d; color: #80ff00"&gt;.&lt;/span&gt;&lt;span style="background: #10100d; color: #e8e8e8"&gt;ItemsSource &lt;/span&gt;&lt;span style="background: #10100d; color: #80ff00"&gt;= &lt;/span&gt;&lt;span style="background: #10100d; color: #e8e8e8"&gt;selectedDepartment&lt;/span&gt;&lt;span style="background: #10100d; color: #80ff00"&gt;.&lt;/span&gt;&lt;span style="background: #10100d; color: #e8e8e8"&gt;Employees&lt;/span&gt;&lt;span style="background: #10100d; color: #a79a86"&gt;;
            }  
        }      &lt;/span&gt;&lt;/pre&gt;
&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;

&lt;p&gt;Download sample project here :&lt;/p&gt;
&lt;iframe style="border-bottom: #dde5e9 1px solid; border-left: #dde5e9 1px solid; padding-bottom: 0px; background-color: #ffffff; margin: 3px; padding-left: 0px; width: 240px; padding-right: 0px; height: 26px; border-top: #dde5e9 1px solid; border-right: #dde5e9 1px solid; padding-top: 0px" marginheight="0" src="http://cid-925c2d2bb2d03c6b.skydrive.live.com/embedrow.aspx/SLToolkitAstoria/SLToolkitWithAstoria%7C_Chart%7C_DrillDown.zip" frameborder="0" marginwidth="0" scrolling="no"&gt;&lt;/iframe&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9726027" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/msdn/nbTP/~4/y1BtC19tpNE" height="1" width="1"/&gt;</content><author><name>PhaniRajuYN</name><uri>http://blogs.msdn.com/members/PhaniRajuYN.aspx</uri></author><category term="Astoria" scheme="http://blogs.msdn.com/phaniraj/archive/tags/Astoria/default.aspx" /><category term="Documentation" scheme="http://blogs.msdn.com/phaniraj/archive/tags/Documentation/default.aspx" /><category term="Silverlight" scheme="http://blogs.msdn.com/phaniraj/archive/tags/Silverlight/default.aspx" /><category term="DataServiceContext" scheme="http://blogs.msdn.com/phaniraj/archive/tags/DataServiceContext/default.aspx" /><feedburner:origLink>http://blogs.msdn.com/phaniraj/archive/2009/06/11/silverlight-toolkit-with-ado-net-data-services-drill-down-charts-using-astoria.aspx</feedburner:origLink></entry><entry><title>Silverlight toolkit with ADO.NET Data services , Master-Details with Accordion</title><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/msdn/nbTP/~3/lkFNluLNQpk/silverlight-toolkit-with-ado-net-data-services-master-details-with-accordion.aspx" /><id>http://blogs.msdn.com/phaniraj/archive/2009/06/10/silverlight-toolkit-with-ado-net-data-services-master-details-with-accordion.aspx</id><published>2009-06-10T10:41:15Z</published><updated>2009-06-10T10:41:15Z</updated><content type="html">&lt;p&gt;Download the sample Silverlight project here : &lt;/p&gt; &lt;iframe style="border-bottom: #dde5e9 1px solid; border-left: #dde5e9 1px solid; padding-bottom: 0px; background-color: #ffffff; margin: 3px; padding-left: 0px; width: 240px; padding-right: 0px; height: 26px; border-top: #dde5e9 1px solid; border-right: #dde5e9 1px solid; padding-top: 0px" marginheight="0" src="http://cid-925c2d2bb2d03c6b.skydrive.live.com/embedrow.aspx/SLToolkitAstoria/SLToolkitWithAstoria.zip" frameborder="0" marginwidth="0" scrolling="no"&gt;&lt;/iframe&gt;  &lt;p&gt;About the Silverlight toolkit&amp;#160; , &lt;/p&gt;  &lt;p&gt;From their Codeplex page : &lt;a title="http://silverlight.codeplex.com/" href="http://silverlight.codeplex.com/"&gt;http://silverlight.codeplex.com/&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;“The Silverlight Toolkit is a collection of Silverlight controls, components and utilities made available outside the normal Silverlight release cycle”&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;In the first of a series I am planning , we will talk about how to achieve a Master-Child display using the Accordion control&amp;#160; &lt;br /&gt;from the Silverlight Toolkit control.&lt;/p&gt;  &lt;p&gt;The data model we will be binding looks like this :&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/phaniraj/WindowsLiveWriter/Silverlighttoolk.NETDataservicesTreeView_10E57/SLToolkitAccordion_DataModel.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="SLToolkitAccordion_DataModel" border="0" alt="SLToolkitAccordion_DataModel" src="http://blogs.msdn.com/blogfiles/phaniraj/WindowsLiveWriter/Silverlighttoolk.NETDataservicesTreeView_10E57/SLToolkitAccordion_DataModel_thumb.png" width="547" height="191" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Type Employee has a property called Department of type Department.    &lt;br /&gt;Type Department has a collection of type Employee called Employees.&lt;/p&gt;  &lt;p&gt;Employee and Department are related 1..1    &lt;br /&gt;Department and Employee are related 1..M&lt;/p&gt;  &lt;p&gt;We want to bind the Department names to the header of the Accordion and    &lt;br /&gt;the employees as a list inside the content of the accordion.     &lt;br /&gt;When we are done , the final output should look like this :&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/phaniraj/WindowsLiveWriter/Silverlighttoolk.NETDataservicesTreeView_10E57/SLTOolkit_Accordionoutput.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="SLTOolkit_Accordionoutput" border="0" alt="SLTOolkit_Accordionoutput" src="http://blogs.msdn.com/blogfiles/phaniraj/WindowsLiveWriter/Silverlighttoolk.NETDataservicesTreeView_10E57/SLTOolkit_Accordionoutput_thumb.png" width="464" height="115" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Configuring the header to show the DepartmentName&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;The Header template of the Accordion has a textblock which binds to the DepartMentName property of the    &lt;br /&gt;Department entity.     &lt;br /&gt;&lt;/p&gt;  &lt;pre class="code"&gt;&lt;span style="color: blue"&gt; &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;layoutToolkit&lt;/span&gt;&lt;span style="color: blue"&gt;:&lt;/span&gt;&lt;span style="color: #a31515"&gt;Accordion.HeaderTemplate &lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
       &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;DataTemplate&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
            &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;TextBlock &lt;/span&gt;&lt;span style="color: red"&gt;Text&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;{&lt;/span&gt;&lt;span style="color: #a31515"&gt;Binding &lt;/span&gt;&lt;span style="color: red"&gt;Path&lt;/span&gt;&lt;span style="color: blue"&gt;=DepartMentName}&amp;quot;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;TextBlock&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
       &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;DataTemplate&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
 &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;layoutToolkit&lt;/span&gt;&lt;span style="color: blue"&gt;:&lt;/span&gt;&lt;span style="color: #a31515"&gt;Accordion.HeaderTemplate&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;&lt;strong&gt;Configuring the content to show the names of the employees working in the department.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The content of the Accordion pane would be a list box which is bound to the Employees collection of the Department 
  &lt;br /&gt;entity type and shows the EmployeeName as the DisplayMember. 

  &lt;br /&gt;&lt;/p&gt;

&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;layoutToolkit&lt;/span&gt;&lt;span style="color: blue"&gt;:&lt;/span&gt;&lt;span style="color: #a31515"&gt;Accordion.ContentTemplate&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
      &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;DataTemplate&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
          &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;ListBox &lt;/span&gt;&lt;span style="color: red"&gt;ItemsSource&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;{&lt;/span&gt;&lt;span style="color: #a31515"&gt;Binding &lt;/span&gt;&lt;span style="color: red"&gt;Employees&lt;/span&gt;&lt;span style="color: blue"&gt;}&amp;quot; &lt;/span&gt;&lt;span style="color: red"&gt;DisplayMemberPath&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;EmployeeName&amp;quot;&amp;gt;
          &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;ListBox&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
      &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;DataTemplate&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;layoutToolkit&lt;/span&gt;&lt;span style="color: blue"&gt;:&lt;/span&gt;&lt;span style="color: #a31515"&gt;Accordion.ContentTemplate&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;

&lt;p&gt;To write the Silverlight client code for this project ,we will need to generate the Client classes with Databinding enabled. 
  &lt;br /&gt;As shown in &lt;a href="http://blogs.msdn.com/astoriateam/archive/2009/03/21/ado-net-data-services-v1-5-ctp1-data-binding-overview.aspx"&gt;this article&lt;/a&gt; on our team blog .&lt;/p&gt;

&lt;p&gt;Once this is done , we have two ways of binding the accordion , 
  &lt;br /&gt;Eager Loading : Download the employees for a department when you download the departments 

  &lt;br /&gt;Lazy Load : Download the employees for a department when the header of an accordion pane , i.e Department is clicked.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Eager Loading :&lt;/strong&gt;&lt;/p&gt;

&lt;pre class="code"&gt;&lt;span style="color: #2b91af"&gt;DataServiceQuery&lt;/span&gt;&amp;lt;&lt;span style="color: #2b91af"&gt;Department&lt;/span&gt;&amp;gt; deptQueryWithEmployees = context.Departments.Expand(&lt;span style="color: #a31515"&gt;&amp;quot;Employees&amp;quot;&lt;/span&gt;) &lt;span style="color: blue"&gt;as &lt;/span&gt;&lt;span style="color: #2b91af"&gt;DataServiceQuery&lt;/span&gt;&amp;lt;&lt;span style="color: #2b91af"&gt;Department&lt;/span&gt;&amp;gt;;&lt;br /&gt;deptQueryWithEmployees.QueryAndBind(acDepartments);&lt;/pre&gt;
&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;

&lt;p&gt;Since the query part itself isnt interesting in the context of this blog post , I’ve abstracted away the querying into an extension method ( QueryAndBind ) and will be available as part of the download. 
  &lt;br /&gt;&lt;/p&gt;

&lt;p&gt;Here , as you can see , we are eager loading the Employees for the departments . 
  &lt;br /&gt;I feel that this is wasteful if you have a large number of departments as this not only increases the amount of data on the wire , but it also means that all the data that comes down the wire will be useful .&lt;/p&gt;

&lt;p&gt;For example, if you have about 15 departments and a user may click on 5 or less departments , then downloading employees for all the 15 departments seems inefficient. 
  &lt;br /&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Xaml for Eager Loading&lt;/strong&gt;&lt;/p&gt;

&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;layoutToolkit&lt;/span&gt;&lt;span style="color: blue"&gt;:&lt;/span&gt;&lt;span style="color: #a31515"&gt;Accordion &lt;/span&gt;&lt;span style="color: red"&gt;x&lt;/span&gt;&lt;span style="color: blue"&gt;:&lt;/span&gt;&lt;span style="color: red"&gt;Name&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;acDepartments&amp;quot; &lt;/span&gt;&lt;span style="color: red"&gt;Width&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;400&amp;quot;&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;layoutToolkit&lt;/span&gt;&lt;span style="color: blue"&gt;:&lt;/span&gt;&lt;span style="color: #a31515"&gt;Accordion.HeaderTemplate &lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
        &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;DataTemplate&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
            &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;TextBlock &lt;/span&gt;&lt;span style="color: red"&gt;Text&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;{&lt;/span&gt;&lt;span style="color: #a31515"&gt;Binding &lt;/span&gt;&lt;span style="color: red"&gt;Path&lt;/span&gt;&lt;span style="color: blue"&gt;=DepartMentName}&amp;quot;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;TextBlock&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
        &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;DataTemplate&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
    &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;layoutToolkit&lt;/span&gt;&lt;span style="color: blue"&gt;:&lt;/span&gt;&lt;span style="color: #a31515"&gt;Accordion.HeaderTemplate&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;layoutToolkit&lt;/span&gt;&lt;span style="color: blue"&gt;:&lt;/span&gt;&lt;span style="color: #a31515"&gt;Accordion.ContentTemplate&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
        &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;DataTemplate&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
            &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;ListBox &lt;/span&gt;&lt;span style="color: red"&gt;ItemsSource&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;{&lt;/span&gt;&lt;span style="color: #a31515"&gt;Binding &lt;/span&gt;&lt;span style="color: red"&gt;Employees&lt;/span&gt;&lt;span style="color: blue"&gt;}&amp;quot; &lt;/span&gt;&lt;span style="color: red"&gt;DisplayMemberPath&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;EmployeeName&amp;quot;&amp;gt;
            &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;ListBox&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
        &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;DataTemplate&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
    &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;layoutToolkit&lt;/span&gt;&lt;span style="color: blue"&gt;:&lt;/span&gt;&lt;span style="color: #a31515"&gt;Accordion.ContentTemplate&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;layoutToolkit&lt;/span&gt;&lt;span style="color: blue"&gt;:&lt;/span&gt;&lt;span style="color: #a31515"&gt;Accordion&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;

&lt;p&gt;&lt;strong&gt;Lazy Loading : 
    &lt;br /&gt;&lt;/strong&gt;In this case , we will only bind the Headers and&amp;#160; will bind the Employees only if the header is clicked for that department. In the Silverlight Accordion control , the event SelectionChanged is fired when the header of an Accordion Pane is clicked. 

  &lt;br /&gt;By listening to this event , we can find out which department was clicked and load the Employees for that department using BeginLoadProperty . 

  &lt;br /&gt;&lt;/p&gt;

&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;public &lt;/span&gt;DelayLoad() {
           InitializeComponent();
           context = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;TreeViewDataProvider&lt;/span&gt;(&lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Uri&lt;/span&gt;(&lt;span style="color: #a31515"&gt;&amp;quot;TreeViewDataService.svc&amp;quot;&lt;/span&gt;, &lt;span style="color: #2b91af"&gt;UriKind&lt;/span&gt;.RelativeOrAbsolute));
           LoadDepartments();
}
&lt;span style="color: blue"&gt;private void &lt;/span&gt;LoadDepartments(){
    ((&lt;span style="color: #2b91af"&gt;DataServiceQuery&lt;/span&gt;&amp;lt;&lt;span style="color: #2b91af"&gt;Department&lt;/span&gt;&amp;gt;)context.Departments).QueryAndBind(acDepartments);
}&lt;/pre&gt;
We will subscribe to the SelectionChanged event of the Accordion and add “LoadEmployeesForDepartment” as the event handler. 

&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;private void &lt;/span&gt;LoadEmployeesForDepartment(&lt;span style="color: blue"&gt;object &lt;/span&gt;sender, &lt;span style="color: #2b91af"&gt;SelectionChangedEventArgs &lt;/span&gt;e)
        {
            &lt;span style="color: green"&gt;//The sender is the control that raised the event
            &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Accordion &lt;/span&gt;acControl = sender &lt;span style="color: blue"&gt;as &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Accordion&lt;/span&gt;;
            &lt;span style="color: green"&gt;//Get the Selected Department
            &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Department &lt;/span&gt;selectedDepartment = acControl.SelectedItem &lt;span style="color: blue"&gt;as &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Department&lt;/span&gt;;
            &lt;span style="color: blue"&gt;if &lt;/span&gt;(
                &lt;span style="color: green"&gt;//If the Selected object is department
                &lt;/span&gt;selectedDepartment != &lt;span style="color: blue"&gt;null 
                &lt;/span&gt;&amp;amp;&amp;amp; (
                &lt;span style="color: green"&gt;// If the Employees collection is null or empty
                &lt;/span&gt;selectedDepartment.Employees == &lt;span style="color: blue"&gt;null &lt;/span&gt;|| selectedDepartment.Employees.Count == 0)
                )
            {
                &lt;span style="color: green"&gt;//Call load property , which updates the Employees collection of this instance 
                //and the UI automatically updates itself, since Department type implements INotifyPropertyChanged
                &lt;/span&gt;context.LoadPropertyAndCall&amp;lt;&lt;span style="color: #2b91af"&gt;Employee&lt;/span&gt;&amp;gt;(selectedDepartment, &lt;span style="color: #a31515"&gt;&amp;quot;Employees&amp;quot;&lt;/span&gt;,
                    &lt;span style="color: blue"&gt;null&lt;/span&gt;);
            }

        }&lt;/pre&gt;
&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;

&lt;p&gt;&lt;strong&gt;XAML for Delay Load :&lt;/strong&gt;&lt;/p&gt;

&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;layoutToolkit&lt;/span&gt;&lt;span style="color: blue"&gt;:&lt;/span&gt;&lt;span style="color: #a31515"&gt;Accordion &lt;/span&gt;&lt;span style="color: red"&gt;x&lt;/span&gt;&lt;span style="color: blue"&gt;:&lt;/span&gt;&lt;span style="color: red"&gt;Name&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;acDepartments&amp;quot; &lt;/span&gt;&lt;span style="color: red"&gt;SelectionChanged&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;LoadEmployeesForDepartment&amp;quot;&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;layoutToolkit&lt;/span&gt;&lt;span style="color: blue"&gt;:&lt;/span&gt;&lt;span style="color: #a31515"&gt;Accordion.HeaderTemplate &lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
        &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;DataTemplate&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
            &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;TextBlock &lt;/span&gt;&lt;span style="color: red"&gt;Text&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;{&lt;/span&gt;&lt;span style="color: #a31515"&gt;Binding &lt;/span&gt;&lt;span style="color: red"&gt;Path&lt;/span&gt;&lt;span style="color: blue"&gt;=DepartMentName}&amp;quot;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;TextBlock&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
        &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;DataTemplate&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
    &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;layoutToolkit&lt;/span&gt;&lt;span style="color: blue"&gt;:&lt;/span&gt;&lt;span style="color: #a31515"&gt;Accordion.HeaderTemplate&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;layoutToolkit&lt;/span&gt;&lt;span style="color: blue"&gt;:&lt;/span&gt;&lt;span style="color: #a31515"&gt;Accordion.ContentTemplate&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
        &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;DataTemplate&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
            &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;ListBox &lt;/span&gt;&lt;span style="color: red"&gt;ItemsSource&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;{&lt;/span&gt;&lt;span style="color: #a31515"&gt;Binding &lt;/span&gt;&lt;span style="color: red"&gt;Employees&lt;/span&gt;&lt;span style="color: blue"&gt;}&amp;quot; &lt;/span&gt;&lt;span style="color: red"&gt;DisplayMemberPath&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;EmployeeName&amp;quot;&amp;gt;
            &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;ListBox&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
        &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;DataTemplate&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
    &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;layoutToolkit&lt;/span&gt;&lt;span style="color: blue"&gt;:&lt;/span&gt;&lt;span style="color: #a31515"&gt;Accordion.ContentTemplate&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;layoutToolkit&lt;/span&gt;&lt;span style="color: blue"&gt;:&lt;/span&gt;&lt;span style="color: #a31515"&gt;Accordion&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;

&lt;p&gt;Download the sample Silverlight project here : &lt;/p&gt;
&lt;iframe style="border-bottom: #dde5e9 1px solid; border-left: #dde5e9 1px solid; padding-bottom: 0px; background-color: #ffffff; margin: 3px; padding-left: 0px; width: 240px; padding-right: 0px; height: 26px; border-top: #dde5e9 1px solid; border-right: #dde5e9 1px solid; padding-top: 0px" marginheight="0" src="http://cid-925c2d2bb2d03c6b.skydrive.live.com/embedrow.aspx/SLToolkitAstoria/SLToolkitWithAstoria.zip" frameborder="0" marginwidth="0" scrolling="no"&gt;&lt;/iframe&gt;

&lt;p&gt;&lt;strong&gt;Running the sample app &lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Set SLToolkitWithAstoriaWeb as the Start-up project. &lt;/li&gt;

  &lt;li&gt;Set SLToolkitWithAstoriaTestPage.html as the start-up page. &lt;/li&gt;

  &lt;li&gt;To run the EagerLoading sample , just hit F5 &lt;/li&gt;

  &lt;li&gt;To run the DelayLoad sample , follow a-c and add the Query string ?delayLoad to the address bar in the browser that comes up. &lt;/li&gt;
&lt;/ol&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9723603" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/msdn/nbTP/~4/lkFNluLNQpk" height="1" width="1"/&gt;</content><author><name>PhaniRajuYN</name><uri>http://blogs.msdn.com/members/PhaniRajuYN.aspx</uri></author><category term="Astoria" scheme="http://blogs.msdn.com/phaniraj/archive/tags/Astoria/default.aspx" /><category term="Demo" scheme="http://blogs.msdn.com/phaniraj/archive/tags/Demo/default.aspx" /><category term="Silverlight" scheme="http://blogs.msdn.com/phaniraj/archive/tags/Silverlight/default.aspx" /><category term="DataServiceContext" scheme="http://blogs.msdn.com/phaniraj/archive/tags/DataServiceContext/default.aspx" /><feedburner:origLink>http://blogs.msdn.com/phaniraj/archive/2009/06/10/silverlight-toolkit-with-ado-net-data-services-master-details-with-accordion.aspx</feedburner:origLink></entry><entry><title>Set Based Operations in Ado.net Data Services Part II</title><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/msdn/nbTP/~3/mfZMpgRHzJw/set-based-operations-in-ado-net-data-services-part-ii.aspx" /><id>http://blogs.msdn.com/phaniraj/archive/2009/05/27/set-based-operations-in-ado-net-data-services-part-ii.aspx</id><published>2009-05-27T08:59:00Z</published><updated>2009-05-27T08:59:00Z</updated><content type="html">&lt;P&gt;As an extension to the last blog post dealing with &lt;A href="http://blogs.msdn.com/phaniraj/archive/2008/07/17/set-based-operations-in-ado-net-data-services.aspx" mce_href="http://blogs.msdn.com/phaniraj/archive/2008/07/17/set-based-operations-in-ado-net-data-services.aspx"&gt;Set based filter operations in our client library&lt;/A&gt; ,&lt;BR&gt;we will introduce support for the specifying method calls in the filter expression.&lt;/P&gt;&lt;B&gt;What does this achieve ?&lt;/B&gt;&lt;BR&gt;Currently , the IsIn operator only supports an equality comparision. &lt;BR&gt;With support for Method Calls , you can now select entities in a set which when passed to a method , evaluate true. ex: You can generate Uris such as this : &lt;BR&gt;
&lt;OL&gt;
&lt;LI&gt;/northwind.svc/Customers?$filter = substringof('London',City) or substringof('Berlin',City) or substringof('Prague',City) 
&lt;LI&gt;/northwind.svc/Customers?$filter = startswith('London',City) or startswith('Berlin',City) or startswith('Prague',City) 
&lt;LI&gt;/northwind.svc/Customers?$filter = endswith('London',City) or endswith('Berlin',City) or endswith('Prague',City) &lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;Fortunately , not a lot of code change is required to get this support.&lt;/P&gt;
&lt;P&gt;We will change the first parameter of the extension method from &lt;/P&gt;&lt;PRE class=code&gt;&lt;SPAN style="COLOR: #2b91af"&gt;Expression&lt;/SPAN&gt;&amp;lt;&lt;SPAN style="COLOR: #2b91af"&gt;Func&lt;/SPAN&gt;&amp;lt;TEntity, &lt;SPAN style="COLOR: blue"&gt;object&lt;/SPAN&gt;&amp;gt;&amp;gt; propertyExpression&lt;/PRE&gt;&lt;A href="http://11011.net/software/vspaste" mce_href="http://11011.net/software/vspaste"&gt;&lt;/A&gt;
&lt;P&gt;to &lt;/P&gt;&lt;PRE class=code&gt;&lt;SPAN style="COLOR: #2b91af"&gt;Expression&lt;/SPAN&gt;&amp;lt;&lt;SPAN style="COLOR: #2b91af"&gt;Func&lt;/SPAN&gt;&amp;lt;TEntity, TValue, &lt;SPAN style="COLOR: blue"&gt;bool&lt;/SPAN&gt;&amp;gt;&amp;gt; comparisionInvokeExpression&lt;/PRE&gt;&lt;A href="http://11011.net/software/vspaste" mce_href="http://11011.net/software/vspaste"&gt;&lt;/A&gt;
&lt;P&gt;which means that where we were initially sending an expression that selects a property of the entity , we now send the Extension method a delegate that accepts the entity and the value being compared against it and returns a boolean value after comparison using a method.&lt;/P&gt;&lt;A href="http://11011.net/software/vspaste" mce_href="http://11011.net/software/vspaste"&gt;&lt;/A&gt;
&lt;P&gt;example : &lt;BR&gt;&lt;/P&gt;&lt;PRE class=code&gt;&lt;SPAN style="COLOR: #2b91af"&gt;Expression&lt;/SPAN&gt;&amp;lt;&lt;SPAN style="COLOR: #2b91af"&gt;Func&lt;/SPAN&gt;&amp;lt;T, &lt;SPAN style="COLOR: blue"&gt;object&lt;/SPAN&gt;&amp;gt;&amp;gt; propertyExpression &lt;STRONG&gt;&lt;EM&gt;means&lt;/EM&gt;&lt;/STRONG&gt;&lt;/PRE&gt;&lt;PRE class=code&gt;customer =&amp;gt; customer.City&lt;/PRE&gt;&lt;PRE class=code&gt;&lt;SPAN style="COLOR: #2b91af"&gt;Expression&lt;/SPAN&gt;&amp;lt;&lt;SPAN style="COLOR: #2b91af"&gt;Func&lt;/SPAN&gt;&amp;lt;TEntity, TValue, &lt;SPAN style="COLOR: blue"&gt;bool&lt;/SPAN&gt;&amp;gt;&amp;gt; comparisionInvokeExpression &lt;STRONG&gt;&lt;EM&gt;means&lt;/EM&gt;&lt;/STRONG&gt;&lt;/PRE&gt;&lt;A href="http://11011.net/software/vspaste" mce_href="http://11011.net/software/vspaste"&gt;&lt;/A&gt;&lt;PRE class=code&gt;(cust, cityName) =&amp;gt; cust.City.ToLower().StartsWith(cityName)&lt;/PRE&gt;&lt;A href="http://11011.net/software/vspaste" mce_href="http://11011.net/software/vspaste"&gt;&lt;/A&gt;
&lt;P&gt;The second change is in the location where we build the comparision expression for values in the set. &lt;BR&gt;we change the line which does the comparision using Expression.Equal with a method call to the comparision expression passed in . &lt;BR&gt;We will change&amp;nbsp; :&lt;/P&gt;&lt;PRE class=code&gt;&lt;SPAN style="COLOR: green"&gt;//Build a comparision expression which equats the Id of the ENtity with this value in the IDs list
// ex : e.Id == 1
&lt;/SPAN&gt;&lt;SPAN style="COLOR: #2b91af"&gt;Expression &lt;/SPAN&gt;comparison = &lt;SPAN style="COLOR: #2b91af"&gt;Expression&lt;/SPAN&gt;.Equal(left, &lt;SPAN style="COLOR: #2b91af"&gt;Expression&lt;/SPAN&gt;.Constant(id));&lt;/PRE&gt;to : &lt;BR&gt;&lt;PRE class=code&gt;&lt;SPAN style="COLOR: green"&gt;//The Left Hand Side of the Filter Expression
&lt;/SPAN&gt;&lt;SPAN style="COLOR: #2b91af"&gt;MethodCallExpression &lt;/SPAN&gt;comaprisionMethod = comparisionInvokeExpression.Body &lt;SPAN style="COLOR: blue"&gt;as &lt;/SPAN&gt;&lt;SPAN style="COLOR: #2b91af"&gt;MethodCallExpression&lt;/SPAN&gt;;&lt;/PRE&gt;&lt;PRE class=code&gt;&lt;SPAN style="COLOR: green"&gt;//Build a comparision expression which calls the method that does the comparision for us
//ex : c=&amp;gt; c.City.Contains(id)
&lt;/SPAN&gt;&lt;SPAN style="COLOR: #2b91af"&gt;Expression &lt;/SPAN&gt;comparison = &lt;SPAN style="COLOR: #2b91af"&gt;Expression&lt;/SPAN&gt;.Call(
                        comaprisionMethod.Object,
                        comaprisionMethod.Method,
                        &lt;SPAN style="COLOR: #2b91af"&gt;Expression&lt;/SPAN&gt;.Constant(id) );&lt;/PRE&gt;&lt;A href="http://11011.net/software/vspaste" mce_href="http://11011.net/software/vspaste"&gt;&lt;/A&gt;&lt;A href="http://11011.net/software/vspaste" mce_href="http://11011.net/software/vspaste"&gt;&lt;/A&gt;
&lt;P&gt;The complete code sample is here : &lt;BR&gt;
&lt;SCRIPT src="http://gist.github.com/117227.js" mce_src="http://gist.github.com/117227.js"&gt;&lt;/SCRIPT&gt;
&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9643661" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/msdn/nbTP/~4/mfZMpgRHzJw" height="1" width="1"/&gt;</content><author><name>PhaniRajuYN</name><uri>http://blogs.msdn.com/members/PhaniRajuYN.aspx</uri></author><category term="Astoria" scheme="http://blogs.msdn.com/phaniraj/archive/tags/Astoria/default.aspx" /><category term="Demo" scheme="http://blogs.msdn.com/phaniraj/archive/tags/Demo/default.aspx" /><category term="DataServiceContext" scheme="http://blogs.msdn.com/phaniraj/archive/tags/DataServiceContext/default.aspx" /><category term="Linq" scheme="http://blogs.msdn.com/phaniraj/archive/tags/Linq/default.aspx" /><feedburner:origLink>http://blogs.msdn.com/phaniraj/archive/2009/05/27/set-based-operations-in-ado-net-data-services-part-ii.aspx</feedburner:origLink></entry><entry><title>Going to Tech Ed </title><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/msdn/nbTP/~3/hYTE61faIwg/going-to-tech-ed.aspx" /><id>http://blogs.msdn.com/phaniraj/archive/2009/05/08/going-to-tech-ed.aspx</id><published>2009-05-08T03:56:00Z</published><updated>2009-05-08T03:56:00Z</updated><content type="html">&lt;P&gt;I'll be joining Shayne Burgess&amp;nbsp;and Mike Flasko at Tech Ed in LA . &lt;/P&gt;
&lt;P&gt;If you have question/feedback about project Astoria , please drop by the Data Development Technical Learning Center booth at Tech Ed. &lt;/P&gt;
&lt;P&gt;Here's the times at which I'll be available at the TLC booth. 
&lt;TABLE style="BORDER-COLLAPSE: collapse" border=0&gt;
&lt;COLGROUP&gt;
&lt;COL style="WIDTH: 214px"&gt;
&lt;COL style="WIDTH: 193px"&gt;
&lt;COL style="WIDTH: 207px"&gt;&lt;/COLGROUP&gt;
&lt;TBODY vAlign=top&gt;
&lt;TR style="BACKGROUND: white; HEIGHT: 16px"&gt;
&lt;TD style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-LEFT: 7px; PADDING-RIGHT: 7px; BORDER-TOP: medium none; BORDER-RIGHT: medium none" colSpan=3&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR style="HEIGHT: 16px"&gt;
&lt;TD style="BORDER-BOTTOM: #4bacc6 1pt solid; BORDER-LEFT: medium none; PADDING-LEFT: 7px; PADDING-RIGHT: 7px; BACKGROUND: white; BORDER-TOP: medium none; BORDER-RIGHT: #4bacc6 0.75pt solid"&gt;
&lt;P&gt;&lt;SPAN style="COLOR: black"&gt;&lt;STRONG&gt;Tuesday, May 12, 2009&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD style="BORDER-BOTTOM: #4bacc6 1pt solid; BORDER-LEFT: medium none; PADDING-LEFT: 7px; PADDING-RIGHT: 7px; BACKGROUND: #a5d6e3; BORDER-TOP: medium none; BORDER-RIGHT: #4bacc6 0.75pt solid"&gt;
&lt;P&gt;&lt;SPAN style="COLOR: black"&gt;&lt;STRONG&gt;Area&lt;/STRONG&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;&lt;/TD&gt;
&lt;TD style="BORDER-BOTTOM: #4bacc6 1pt solid; BORDER-LEFT: medium none; PADDING-LEFT: 7px; PADDING-RIGHT: 7px; BACKGROUND: #a5d6e3; BORDER-TOP: medium none; BORDER-RIGHT: #4bacc6 1pt solid"&gt;
&lt;P&gt;&lt;SPAN style="COLOR: black"&gt;&lt;STRONG&gt;Station&lt;/STRONG&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR style="HEIGHT: 47px"&gt;
&lt;TD style="BORDER-BOTTOM: #4bacc6 1pt solid; BORDER-LEFT: medium none; PADDING-LEFT: 7px; PADDING-RIGHT: 7px; BACKGROUND: white; BORDER-TOP: medium none; BORDER-RIGHT: #4bacc6 1pt solid"&gt;
&lt;P&gt;&lt;SPAN style="COLOR: black"&gt;&lt;STRONG&gt;9:30 AM - 12:30 PM&lt;/STRONG&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;&lt;/TD&gt;
&lt;TD style="BORDER-BOTTOM: #4bacc6 1pt solid; BORDER-LEFT: medium none; PADDING-LEFT: 7px; PADDING-RIGHT: 7px; BACKGROUND: #d2eaf1; BORDER-TOP: medium none; BORDER-RIGHT: #4bacc6 1pt solid"&gt;
&lt;P&gt;&lt;SPAN style="COLOR: black"&gt;Developer Tools, Languages and Frameworks&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD style="BORDER-BOTTOM: #4bacc6 1pt solid; BORDER-LEFT: medium none; PADDING-LEFT: 7px; PADDING-RIGHT: 7px; BACKGROUND: #d2eaf1; BORDER-TOP: medium none; BORDER-RIGHT: #4bacc6 1pt solid"&gt;
&lt;P&gt;&lt;SPAN style="COLOR: black"&gt;TLC/BLUE/DTL: Microsoft Data Development&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR style="HEIGHT: 16px"&gt;
&lt;TD style="BORDER-BOTTOM: #4bacc6 1pt solid; BORDER-LEFT: medium none; PADDING-LEFT: 7px; PADDING-RIGHT: 7px; BACKGROUND: white; BORDER-TOP: medium none; BORDER-RIGHT: #4bacc6 0.75pt solid"&gt;
&lt;P&gt;&lt;SPAN style="COLOR: black"&gt;&lt;STRONG&gt;Wednesday, May 13, 2009&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD style="BORDER-BOTTOM: #4bacc6 1pt solid; BORDER-LEFT: medium none; PADDING-LEFT: 7px; PADDING-RIGHT: 7px; BACKGROUND: #a5d6e3; BORDER-TOP: medium none; BORDER-RIGHT: #4bacc6 0.75pt solid"&gt;
&lt;P&gt;&lt;SPAN style="COLOR: black"&gt;&lt;STRONG&gt;Area&lt;/STRONG&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;&lt;/TD&gt;
&lt;TD style="BORDER-BOTTOM: #4bacc6 1pt solid; BORDER-LEFT: medium none; PADDING-LEFT: 7px; PADDING-RIGHT: 7px; BACKGROUND: #a5d6e3; BORDER-TOP: medium none; BORDER-RIGHT: #4bacc6 1pt solid"&gt;
&lt;P&gt;&lt;SPAN style="COLOR: black"&gt;&lt;STRONG&gt;Station&lt;/STRONG&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR style="HEIGHT: 63px"&gt;
&lt;TD style="BORDER-BOTTOM: #4bacc6 1pt solid; BORDER-LEFT: medium none; PADDING-LEFT: 7px; PADDING-RIGHT: 7px; BACKGROUND: white; BORDER-TOP: medium none; BORDER-RIGHT: #4bacc6 1pt solid"&gt;
&lt;P&gt;&lt;SPAN style="COLOR: black"&gt;&lt;STRONG&gt;12:15 PM - 3:15 PM&lt;/STRONG&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;&lt;/TD&gt;
&lt;TD style="BORDER-BOTTOM: #4bacc6 1pt solid; BORDER-LEFT: medium none; PADDING-LEFT: 7px; PADDING-RIGHT: 7px; BACKGROUND: #d2eaf1; BORDER-TOP: medium none; BORDER-RIGHT: #4bacc6 1pt solid"&gt;
&lt;P&gt;&lt;SPAN style="COLOR: black"&gt;Developer Tools, Languages and Frameworks&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;&lt;/TD&gt;
&lt;TD style="BORDER-BOTTOM: #4bacc6 1pt solid; BORDER-LEFT: medium none; PADDING-LEFT: 7px; PADDING-RIGHT: 7px; BACKGROUND: #d2eaf1; BORDER-TOP: medium none; BORDER-RIGHT: #4bacc6 1pt solid"&gt;
&lt;P&gt;&lt;SPAN style="COLOR: black"&gt;TLC/BLUE/DTL: Microsoft Data Development&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR style="HEIGHT: 16px"&gt;
&lt;TD style="BORDER-BOTTOM: #4bacc6 1pt solid; BORDER-LEFT: medium none; PADDING-LEFT: 7px; PADDING-RIGHT: 7px; BACKGROUND: white; BORDER-TOP: medium none; BORDER-RIGHT: #4bacc6 0.75pt solid"&gt;
&lt;P&gt;&lt;SPAN style="COLOR: black"&gt;&lt;STRONG&gt;Thursday, May 14, 2009&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD style="BORDER-BOTTOM: #4bacc6 1pt solid; BORDER-LEFT: medium none; PADDING-LEFT: 7px; PADDING-RIGHT: 7px; BACKGROUND: #a5d6e3; BORDER-TOP: medium none; BORDER-RIGHT: #4bacc6 0.75pt solid"&gt;
&lt;P&gt;&lt;SPAN style="COLOR: black"&gt;&lt;STRONG&gt;Area&lt;/STRONG&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;&lt;/TD&gt;
&lt;TD style="BORDER-BOTTOM: #4bacc6 1pt solid; BORDER-LEFT: medium none; PADDING-LEFT: 7px; PADDING-RIGHT: 7px; BACKGROUND: #a5d6e3; BORDER-TOP: medium none; BORDER-RIGHT: #4bacc6 1pt solid"&gt;
&lt;P&gt;&lt;SPAN style="COLOR: black"&gt;&lt;STRONG&gt;Station&lt;/STRONG&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR style="HEIGHT: 63px"&gt;
&lt;TD style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-LEFT: 7px; PADDING-RIGHT: 7px; BACKGROUND: white; BORDER-TOP: medium none; BORDER-RIGHT: #4bacc6 1pt solid"&gt;
&lt;P&gt;&lt;SPAN style="COLOR: black"&gt;&lt;STRONG&gt;8:00 AM - 11:00 AM&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD style="BORDER-BOTTOM: #4bacc6 1pt solid; BORDER-LEFT: medium none; PADDING-LEFT: 7px; PADDING-RIGHT: 7px; BACKGROUND: #d2eaf1; BORDER-TOP: medium none; BORDER-RIGHT: #4bacc6 1pt solid"&gt;
&lt;P&gt;&lt;SPAN style="COLOR: black"&gt;Developer Tools, Languages and Frameworks&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;&lt;/TD&gt;
&lt;TD style="BORDER-BOTTOM: #4bacc6 1pt solid; BORDER-LEFT: medium none; PADDING-LEFT: 7px; PADDING-RIGHT: 7px; BACKGROUND: #d2eaf1; BORDER-TOP: medium none; BORDER-RIGHT: #4bacc6 1pt solid"&gt;
&lt;P&gt;&lt;SPAN style="COLOR: black"&gt;TLC/BLUE/DTL: Microsoft Data Development&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9595440" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/msdn/nbTP/~4/hYTE61faIwg" height="1" width="1"/&gt;</content><author><name>PhaniRajuYN</name><uri>http://blogs.msdn.com/members/PhaniRajuYN.aspx</uri></author><feedburner:origLink>http://blogs.msdn.com/phaniraj/archive/2009/05/08/going-to-tech-ed.aspx</feedburner:origLink></entry><entry><title>Reporting with ADO.NET Data Services and Telerik Report Viewer</title><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/msdn/nbTP/~3/E0nB0AVGpms/reporting-with-ado-net-data-services-and-telerik-report-viewer.aspx" /><id>http://blogs.msdn.com/phaniraj/archive/2009/05/04/reporting-with-ado-net-data-services-and-telerik-report-viewer.aspx</id><published>2009-05-04T08:00:00Z</published><updated>2009-05-04T08:00:00Z</updated><content type="html">&lt;P&gt;Telerik has a range of controls that work with ADO.NET Data Services as the data source . Take a look at them here :&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.telerik.com/SearchResults.aspx?IndexCatalogue=Blogs&amp;amp;SearchQuery=ado.net%20data%20services" target=_blank mce_href="http://blogs.telerik.com/SearchResults.aspx?IndexCatalogue=Blogs&amp;amp;SearchQuery=ado.net%20data%20services"&gt;ADO.NET Data Services with Telerik Controls&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.myviewstate.net/blog/post/2009/05/01/A-fresh-starte280a6.aspx" target=_blank mce_href="http://www.myviewstate.net/blog/post/2009/05/01/A-fresh-starte280a6.aspx"&gt;Kevin Babcock&lt;/A&gt; has a great post over at Telerik where he talks about &lt;A href="http://blogs.telerik.com/kevinbabcock/posts/09-04-24/connecting_the_dots_ado_net_data_services_and_telerik_reporting.aspx" target=_blank mce_href="http://blogs.telerik.com/kevinbabcock/posts/09-04-24/connecting_the_dots_ado_net_data_services_and_telerik_reporting.aspx"&gt;using ADO.NET Data Services with Telerik Reporting suite&lt;/A&gt; .&lt;/P&gt;
&lt;P&gt;I wanted to address one small point in the blog post which I felt can be improved upon. &lt;/P&gt;
&lt;SCRIPT src="http://gist.github.com/109416.js" mce_src="http://gist.github.com/109416.js"&gt;&lt;/SCRIPT&gt;

&lt;P&gt;“You might be curious why I chose to iterate through the list of categories in the report parameter value, calling the web service for each one and appending the results to a collection. &lt;BR&gt;The reason is that, due to the limitations of ADO.NET Data Services, you can’t use methods like Contains to filter data in your LINQ queries.“&lt;/P&gt;
&lt;P&gt;Yes , this is absolutely correct. &lt;BR&gt;We don't support the “Contains” operator to select a primitive property of the Entity Type from a given range of values. &lt;BR&gt;The client linq implementation doesn't support Contains on Navigation properties is because we don't have a URI Query operator&amp;nbsp; that corresponds to the "Contains" function to select a value from a set. But you can semantically achieve the same effect by “OR”ing a couple of “EQUALS” expressions.&lt;/P&gt;
&lt;P&gt;ex: &lt;/P&gt;
&lt;P&gt;If A={0,1,2,3}&amp;nbsp; , then A.Contains(B) is equivalent to ( B == A[0] OR B ==A[1] OR B == A[2])&lt;/P&gt;
&lt;P&gt;I wrote about achieving this effect here :&amp;nbsp; &lt;A href="http://blogs.msdn.com/phaniraj/archive/2008/07/17/set-based-operations-in-ado-net-data-services.aspx" mce_href="http://blogs.msdn.com/phaniraj/archive/2008/07/17/set-based-operations-in-ado-net-data-services.aspx"&gt;Set Based Operations in Ado.net Data Services&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Now, in this sample , we are filtering an Entity Set (Products) based on the value of a primitive property ( CategoryID ) of a Navigation Property (Categories). &lt;BR&gt;Now , since this is the Northwind model Schema, Products are related to categories in a 1..M association and Categories to Products in a 1..M association. &lt;BR&gt;&lt;BR&gt;What this means is that the above query can be expressed as :&amp;nbsp; &lt;BR&gt;&lt;SPAN style="COLOR: green"&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;SCRIPT src="http://gist.github.com/109412.js" mce_src="http://gist.github.com/109412.js"&gt;&lt;/SCRIPT&gt;

&lt;P&gt;Now , this is still not as optimal as it can be , but we reduced the number of round trips as we download only relevant categories and their associated Products. &lt;BR&gt;To make this even easier , we use the IsIn&amp;lt;T&amp;gt; extension method I wrote from &lt;A href="http://blogs.msdn.com/phaniraj/archive/2008/07/17/set-based-operations-in-ado-net-data-services.aspx" mce_href="http://blogs.msdn.com/phaniraj/archive/2008/07/17/set-based-operations-in-ado-net-data-services.aspx"&gt;Set Based Operations in Ado.net Data Services&lt;/A&gt;.&lt;/P&gt;
&lt;SCRIPT src="http://gist.github.com/109419.js" mce_src="http://gist.github.com/109419.js"&gt;&lt;/SCRIPT&gt;

&lt;P&gt;So , there you have it , we reduced the number of network calls and also the lines of code to achieve this filtering.&lt;/P&gt;
&lt;P&gt;On a side note , &lt;A href="http://blogs.telerik.com/blogs/09-05-02/saying_goodbye_hellip.aspx" target=_blank mce_href="http://blogs.telerik.com/blogs/09-05-02/saying_goodbye_hellip.aspx"&gt;Kevin has left Telerik&lt;/A&gt; and now blogs at : &lt;A title=http://www.myviewstate.net/blog/ href="http://www.myviewstate.net/blog/" mce_href="http://www.myviewstate.net/blog/"&gt;http://www.myviewstate.net/blog/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;All the best for your future endeavours Kevin !!&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9585341" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/msdn/nbTP/~4/E0nB0AVGpms" height="1" width="1"/&gt;</content><author><name>PhaniRajuYN</name><uri>http://blogs.msdn.com/members/PhaniRajuYN.aspx</uri></author><feedburner:origLink>http://blogs.msdn.com/phaniraj/archive/2009/05/04/reporting-with-ado-net-data-services-and-telerik-report-viewer.aspx</feedburner:origLink></entry><entry><title>ADO.NET Data Services Friendly Feeds , Mapping EDM Types - I</title><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/msdn/nbTP/~3/jmbYb9q8OV0/ado-net-data-services-friendly-feeds-mapping-edm-types-i.aspx" /><id>http://blogs.msdn.com/phaniraj/archive/2009/03/28/ado-net-data-services-friendly-feeds-mapping-edm-types-i.aspx</id><published>2009-03-29T00:32:00Z</published><updated>2009-03-29T00:32:00Z</updated><content type="html">&lt;P&gt;As I mentioned in my &lt;A href="http://blogs.msdn.com/phaniraj/archive/2009/03/18/introducing-web-friendly-feeds-aka-friendly-feeds.aspx" mce_href="http://blogs.msdn.com/phaniraj/archive/2009/03/18/introducing-web-friendly-feeds-aka-friendly-feeds.aspx"&gt;last blog post&lt;/A&gt; , here are some samples of how to map your entity properties to Atom/custom markup in the atom:entry element. &lt;BR&gt;You can apply Friendly Feed mappings on the EDM entity types by adding attributes to the CSDL of the Entity Data Model . &lt;BR&gt;We will focus on the kinds of mappings and how to achieve them . &lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Pre-requisites &lt;BR&gt;&lt;BR&gt;&lt;/STRONG&gt;1. To edit the CSDL , you will need to open the EDM model in Xml view .To do this , right-click the EDM model (.EDMX file ) in Visual Studio &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; and select “Open with”-&amp;gt;”Xml Editor” . &lt;BR&gt;2. Add a reference to this namespace in the &lt;STRONG&gt;&amp;lt;edmx:ConceptualModels&amp;gt; &lt;/STRONG&gt;node&amp;nbsp; of the CSDL section in the EDMX file : &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ex: &lt;EM&gt;&lt;STRONG&gt;xmlns:m2="&lt;/STRONG&gt;&lt;/EM&gt;&lt;A title=http://schemas.microsoft.com/ado/2007/08/dataservices/metadata href="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" mce_href="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"&gt;&lt;STRONG&gt;http://schemas.microsoft.com/ado/2007/08/dataservices/metadata&lt;/STRONG&gt;&lt;/A&gt;&lt;EM&gt;&lt;STRONG&gt;"&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;1) Mapping to ATOM elements in the atom:entry payload :&amp;nbsp; &lt;BR&gt;&lt;/STRONG&gt;The EntityPropertyMapping (EPM) attribute has two constructors , one which binds the property to an Atom element in the feed , &lt;BR&gt;and another which binds the property to a custom element . We shall discuss the former in this section. &lt;/P&gt;
&lt;P&gt;For ATOM Mappings , the EPM markup has the following attributes .&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;&lt;B&gt;m2:FC_SourcePath&lt;/B&gt;: The &lt;B&gt;m2:FC_SourcePath&lt;/B&gt; is used when &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; a) The Property you are mapping exists in a base type and not on the current type . &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; b) The property you are mapping exists in a complex type and not on the current type . &lt;/LI&gt;
&lt;LI&gt;&lt;B&gt;m2:FC_TargetPath &lt;/B&gt;: The atom:entry element to which this property has to be mapped to &lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;m2:FC_ContentKind&lt;/STRONG&gt;: The content-type of the mapped&amp;nbsp; atom:entry element &lt;/LI&gt;
&lt;LI&gt;&lt;B&gt;m2:FC_KeepInContent &lt;/B&gt;: set this to false if you want the entity’s property value to turn up only in the mapped atom:entry element and not in the &amp;lt;contents&amp;gt; section. &lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;Lets proceed&amp;nbsp; , using the same BlogPost&amp;nbsp; type that we &lt;A href="http://blogs.msdn.com/phaniraj/archive/2009/03/18/introducing-web-friendly-feeds-aka-friendly-feeds.aspx" mce_href="http://blogs.msdn.com/phaniraj/archive/2009/03/18/introducing-web-friendly-feeds-aka-friendly-feeds.aspx"&gt;discussed last time&lt;/A&gt; . &lt;BR&gt;This is the EDM Markup for the type : &lt;/P&gt;&lt;PRE class=code&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;EntityType &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;Name&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;BlogPost&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;&amp;gt;
  &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;Key&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;
    &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;PropertyRef &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;Name&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;BlogPostID&lt;/SPAN&gt;" &lt;SPAN style="COLOR: blue"&gt;/&amp;gt;
  &amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;Key&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;
  &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;Property &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;Name&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;Lat&lt;/SPAN&gt;" &lt;SPAN style="COLOR: red"&gt;Type&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;Edm.Double&lt;/SPAN&gt;" &lt;SPAN style="COLOR: red"&gt;Nullable&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;false&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;/&amp;gt;
  &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;Property &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;Name&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;Long&lt;/SPAN&gt;" &lt;SPAN style="COLOR: red"&gt;Type&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;Edm.Double&lt;/SPAN&gt;" &lt;SPAN style="COLOR: red"&gt;Nullable&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;false&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;/&amp;gt;
  &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;Property &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;Name&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;Published&lt;/SPAN&gt;" &lt;SPAN style="COLOR: red"&gt;Type&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;Edm.DateTime&lt;/SPAN&gt;" &lt;SPAN style="COLOR: red"&gt;Nullable&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;false&lt;/SPAN&gt;" &lt;SPAN style="COLOR: blue"&gt;/&amp;gt;
  &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;Property &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;Name&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;BlogPostID&lt;/SPAN&gt;" &lt;SPAN style="COLOR: red"&gt;Type&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;Edm.Int32&lt;/SPAN&gt;" &lt;SPAN style="COLOR: red"&gt;Nullable&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;false&lt;/SPAN&gt;" &lt;SPAN style="COLOR: blue"&gt;/&amp;gt;
  &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;Property &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;Name&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;Title&lt;/SPAN&gt;" &lt;SPAN style="COLOR: red"&gt;Type&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;Edm.String&lt;/SPAN&gt;" &lt;SPAN style="COLOR: red"&gt;Nullable&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;true&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;/&amp;gt;
  &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;Property &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;Name&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;Body&lt;/SPAN&gt;" &lt;SPAN style="COLOR: red"&gt;Type&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;Edm.String&lt;/SPAN&gt;" &lt;SPAN style="COLOR: red"&gt;Nullable&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;true&lt;/SPAN&gt;" &lt;SPAN style="COLOR: blue"&gt;/&amp;gt;
  &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;Property &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;Name&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;Author&lt;/SPAN&gt;" &lt;SPAN style="COLOR: red"&gt;Type&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;Edm.String&lt;/SPAN&gt;" &lt;SPAN style="COLOR: red"&gt;Nullable&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;true&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;/&amp;gt;
  &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;Property &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;Name&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;PostURI&lt;/SPAN&gt;" &lt;SPAN style="COLOR: red"&gt;Type&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;Edm.String&lt;/SPAN&gt;" &lt;SPAN style="COLOR: red"&gt;Nullable&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;true&lt;/SPAN&gt;" &lt;SPAN style="COLOR: blue"&gt;/&amp;gt;
  &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;Property &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;Name&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;ContentSummary&lt;/SPAN&gt;" &lt;SPAN style="COLOR: red"&gt;Type&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;Edm.String&lt;/SPAN&gt;" &lt;SPAN style="COLOR: red"&gt;Nullable&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;true&lt;/SPAN&gt;" &lt;SPAN style="COLOR: blue"&gt;/&amp;gt;
  &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;Property &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;Name&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;IconUri&lt;/SPAN&gt;" &lt;SPAN style="COLOR: red"&gt;Type&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;Edm.String&lt;/SPAN&gt;" &lt;SPAN style="COLOR: red"&gt;Nullable&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;true&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;/&amp;gt;
&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;EntityType&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/PRE&gt;&lt;A href="http://11011.net/software/vspaste" mce_href="http://11011.net/software/vspaste"&gt;&lt;/A&gt;
&lt;P&gt;1. Map the “Title” property&amp;nbsp; of the BlogPost Entity type to the entry:title element &lt;/P&gt;
&lt;P&gt;When decorating EDM&amp;nbsp; types , the markup specifying the mapping goes on the property you are mapping , &lt;BR&gt;ex:&lt;/P&gt;&lt;PRE class=code&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;Property &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;Name&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;Title&lt;/SPAN&gt;" &lt;SPAN style="COLOR: red"&gt;Type&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;Edm.String&lt;/SPAN&gt;" &lt;SPAN style="COLOR: red"&gt;Nullable&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;true&lt;/SPAN&gt;"
  &lt;SPAN style="COLOR: red"&gt;m2:FC_TargetPath&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;SyndicationTitle&lt;/SPAN&gt;"
  &lt;SPAN style="COLOR: red"&gt;m2:FC_EpmContentKind&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;Plaintext&lt;/SPAN&gt;"
  &lt;SPAN style="COLOR: red"&gt;m2:FC_EpmKeepInContent&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;true&lt;/SPAN&gt;" &lt;SPAN style="COLOR: blue"&gt;/&amp;gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;A href="http://11011.net/software/vspaste" mce_href="http://11011.net/software/vspaste"&gt;&lt;/A&gt;&lt;A href="http://11011.net/software/vspaste" mce_href="http://11011.net/software/vspaste"&gt;&lt;/A&gt;
&lt;P&gt;2. Map the “Author” property to entry:author element&amp;nbsp; &lt;/P&gt;
&lt;P&gt;This is what the markup would look like :&lt;/P&gt;&lt;PRE class=code&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;Property &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;Name&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;Author&lt;/SPAN&gt;" &lt;SPAN style="COLOR: red"&gt;Type&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;Edm.String&lt;/SPAN&gt;" &lt;SPAN style="COLOR: red"&gt;Nullable&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;true&lt;/SPAN&gt;"
           &lt;SPAN style="COLOR: red"&gt;m2:FC_TargetPath&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;SyndicationAuthorName&lt;/SPAN&gt;"
           &lt;SPAN style="COLOR: red"&gt;m2:FC_ContentKind&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;Plaintext&lt;/SPAN&gt;"
           &lt;SPAN style="COLOR: red"&gt;m2:FC_KeepInContent&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;true&lt;/SPAN&gt;" &lt;SPAN style="COLOR: blue"&gt;/&amp;gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;A href="http://11011.net/software/vspaste" mce_href="http://11011.net/software/vspaste"&gt;&lt;/A&gt;&lt;A href="http://11011.net/software/vspaste" mce_href="http://11011.net/software/vspaste"&gt;&lt;/A&gt;
&lt;P&gt;As described in&amp;nbsp; my previous blog post , you can map an Entity’s properties to the following atom:entry elements in the payload &lt;STRONG&gt;:&lt;/STRONG&gt;&lt;/P&gt;
&lt;TABLE border=0 cellSpacing=0 cellPadding=2 width=512&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=200&gt;&lt;STRONG&gt;atom:entry Element &lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=310&gt;&lt;B&gt;m2:FC_TargetPath &lt;/B&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=200&gt;entry:author/email &lt;/TD&gt;
&lt;TD vAlign=top width=310&gt;SyndicationAuthorEmail&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=200&gt;entry:author/name&lt;/TD&gt;
&lt;TD vAlign=top width=310&gt;SyndicationAuthorName&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=200&gt;entry:author/uri &lt;/TD&gt;
&lt;TD vAlign=top width=310&gt;SyndicationAuthorUri&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=200&gt;entry:published &lt;/TD&gt;
&lt;TD vAlign=top width=310&gt;SyndicationPublished&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=200&gt;entry:rights &lt;/TD&gt;
&lt;TD vAlign=top width=310&gt;SyndicationRights&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=200&gt;entry:summary &lt;/TD&gt;
&lt;TD vAlign=top width=310&gt;SyndicationRights&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=200&gt;entry:title &lt;/TD&gt;
&lt;TD vAlign=top width=310&gt;SyndicationTitle&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR&gt;
&lt;TABLE border=0 cellSpacing=0 cellPadding=2 width=400&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=204&gt;&lt;B&gt;Content-Kind &lt;/B&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=196&gt;&lt;STRONG&gt;m2:FC_ContentKind&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=204&gt;Plaintext&lt;/TD&gt;
&lt;TD vAlign=top width=196&gt;Plaintext&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=204&gt;Html&lt;/TD&gt;
&lt;TD vAlign=top width=196&gt;Html&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=204&gt;Xhtml&lt;/TD&gt;
&lt;TD vAlign=top width=196&gt;XHtml&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=204&gt;Default if not specified. &lt;/TD&gt;
&lt;TD vAlign=top width=196&gt;PlainText&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;
&lt;P&gt;&lt;STRONG&gt;2) Mapping to non-ATOM/custom&amp;nbsp; elements in the atom:entry payload :&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;For non-ATOM/custom Mappings , the EPM markup requires the following attributes.&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;&lt;B&gt;m2:FC_SourcePath&amp;nbsp;&amp;nbsp; &lt;/B&gt;: The property of the Entity Type whose value should be mapped &lt;/LI&gt;
&lt;LI&gt;&lt;B&gt;m2:FC_TargetPath&amp;nbsp; &lt;/B&gt;&amp;nbsp; : The xml path markup which describes the path to the custom markup this property should be mapped to . &lt;/LI&gt;
&lt;LI&gt;&lt;B&gt;m2:FC_NsPrefix&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/B&gt;: The xml prefix for the custom element/attribute that this property is mapped to. &lt;/LI&gt;
&lt;LI&gt;&lt;B&gt;m2:FC_NsUri&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/B&gt;: The xml namespace to which the custom element/attribute that this property is mapped should be under. &lt;/LI&gt;
&lt;LI&gt;&lt;B&gt;m2:FC_KeepInContent &lt;/B&gt;: set this to false if you want the entity’s property value to turn up only in the mapped atom:entry element and not in the &amp;lt;contents&amp;gt; section. &lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;The Xml Path syntax for custom mappings.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;this syntax is very logical and looks like the following . &lt;BR&gt;Lets say that you wanted to map a property to a custom element in markup that looks like this : &lt;/P&gt;&lt;PRE class=csharpcode&gt;&lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;mycustomRoot&lt;/SPAN&gt; &lt;SPAN class=attr&gt;xmlns&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;=”&lt;A href="http://www.mycustomformat.org/" mce_href="http://www.mycustomFormat.org"&gt;http://www.mycustomFormat.org&lt;/A&gt;”&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;
  &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;customElement&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;property value goes here&lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;customElement&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;
&lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;mycustomRoot&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;STYLE type=text/css&gt;









































.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/STYLE&gt;
for this example , &lt;BR&gt;&lt;B&gt;m2:FC_TargetPath&amp;nbsp; &lt;/B&gt;would be “&lt;SPAN class=html&gt;mycustomRoot&lt;/SPAN&gt;/&lt;SPAN&gt;customElement” &lt;BR&gt;&lt;B&gt;m2:FC_NsPrefix&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/B&gt;would be an empty string as this markup has no custom prefix. &lt;BR&gt;&lt;B&gt;m2:FC_NsUri&amp;nbsp; &lt;/B&gt;would be “&lt;A href="http://www.mycustomformat.org/" mce_href="http://www.mycustomFormat.org"&gt;http://www.mycustomFormat.org&lt;/A&gt;” &lt;BR&gt;&lt;B&gt;m2:FC_KeepInContent &lt;/B&gt;is subjective to whether you want to keep the property value in the &amp;lt;content&amp;gt; section or not.&lt;/SPAN&gt; 
&lt;P&gt;and now , lets say that you wanted to map a property to a custom attribute of an element in markup that looks like this : &lt;/P&gt;&lt;PRE class=csharpcode&gt;&lt;SPAN class=kwrd&gt;&amp;lt;me:&lt;/SPAN&gt;&lt;SPAN class=html&gt;mycustomRoot&lt;/SPAN&gt; &lt;SPAN class=attr&gt;xmlns:me&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="http://www.georss.org.georss"&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;
  &lt;SPAN class=kwrd&gt;&amp;lt;me:&lt;/SPAN&gt;&lt;SPAN class=html&gt;customElement&lt;/SPAN&gt; &lt;SPAN class=attr&gt;customAttribute&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="property value goes here"&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&amp;lt;/me:&lt;/SPAN&gt;&lt;SPAN class=html&gt;customElement&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;
&lt;SPAN class=kwrd&gt;&amp;lt;/me:&lt;/SPAN&gt;&lt;SPAN class=html&gt;mycustomRoot&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;P&gt;for this example , &lt;BR&gt;&lt;B&gt;m2:FC_TargetPath&amp;nbsp; &lt;/B&gt;would be &lt;A href="mailto:“mycustomRoot/customElement/@customAttribute" mce_href="mailto:“mycustomRoot/customElement/@customAttribute"&gt;“mycustomRoot/customElement/@customAttribute&lt;/A&gt;” &lt;BR&gt;&lt;B&gt;m2:FC_NsPrefix&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/B&gt;would be “me”. &lt;BR&gt;&lt;B&gt;m2:FC_NsUri&amp;nbsp; &lt;/B&gt;would be “http://www.mycustomFormat.org” &lt;BR&gt;&lt;B&gt;m2:FC_KeepContent &lt;/B&gt;is subjective to whether you want to keep the property value in the &amp;lt;content&amp;gt; section or not.&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;A note , the complexity of your custom markup has a direct effect on the performance costs&amp;nbsp; for Serialization/De-Serialization of the entity type . &lt;BR&gt;with this example , lets map the lat &amp;amp; long properties to geoRss markup ,which looks like this : &lt;BR&gt;&lt;/P&gt;&lt;PRE class=csharpcode&gt;&lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;geo:lat&lt;/SPAN&gt; &lt;SPAN class=attr&gt;xmlns:geo&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="http://www.georss.org/georss"&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;47.684&lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;geo:lat&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;
&lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;geo:long&lt;/SPAN&gt; &lt;SPAN class=attr&gt;xmlns:geo&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="http://www.georss.org/georss"&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;-122.122&lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;geo:long&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;P&gt;Final type definition looks like this : &lt;BR&gt;&lt;/P&gt;&lt;PRE class=code&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;EntityType &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;Name&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;BlogPost&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;&amp;gt;
  &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;Key&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;
    &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;PropertyRef &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;Name&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;BlogPostID&lt;/SPAN&gt;" &lt;SPAN style="COLOR: blue"&gt;/&amp;gt;
  &amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;Key&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;
  &amp;lt;!-- &lt;/SPAN&gt;&lt;SPAN style="COLOR: green"&gt;map the Lat property to the &amp;lt;geo:lat&amp;gt; element  &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;--&amp;gt;
  &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;Property &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;Name&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;Lat&lt;/SPAN&gt;" &lt;SPAN style="COLOR: red"&gt;Type&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;Edm.Double&lt;/SPAN&gt;" &lt;SPAN style="COLOR: red"&gt;Nullable&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;false&lt;/SPAN&gt;"
            &lt;SPAN style="COLOR: red"&gt;m2:FC_TargetPath&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;lat&lt;/SPAN&gt;"
            &lt;SPAN style="COLOR: red"&gt;m2:FC_NsUri&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;http://www.georss.org/georss&lt;/SPAN&gt;"
            &lt;SPAN style="COLOR: red"&gt;m2:FC_NsPrefix&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;geo&lt;/SPAN&gt;"
            &lt;SPAN style="COLOR: red"&gt;m2:FC_KeepContent&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;true&lt;/SPAN&gt;" &lt;SPAN style="COLOR: blue"&gt;/&amp;gt;
  &amp;lt;!-- &lt;/SPAN&gt;&lt;SPAN style="COLOR: green"&gt;map the Long property to the &amp;lt;geo:long&amp;gt; element  &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;--&amp;gt;
  &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;Property &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;Name&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;Long&lt;/SPAN&gt;" &lt;SPAN style="COLOR: red"&gt;Type&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;Edm.Double&lt;/SPAN&gt;" &lt;SPAN style="COLOR: red"&gt;Nullable&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;false&lt;/SPAN&gt;"
            &lt;SPAN style="COLOR: red"&gt;m2:FC_TargetPath&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;long&lt;/SPAN&gt;"
            &lt;SPAN style="COLOR: red"&gt;m2:FC_NsUri&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;http://www.georss.org/georss&lt;/SPAN&gt;"
            &lt;SPAN style="COLOR: red"&gt;m2:FC_NsPrefix&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;geo&lt;/SPAN&gt;"
            &lt;SPAN style="COLOR: red"&gt;m2:FC_KeepContent&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;true&lt;/SPAN&gt;" &lt;SPAN style="COLOR: blue"&gt;/&amp;gt;
  &amp;lt;!-- &lt;/SPAN&gt;&lt;SPAN style="COLOR: green"&gt;Map the “Title” property  of the BlogPost Entity type to the entry:title element &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;--&amp;gt;
  &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;Property &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;Name&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;Title&lt;/SPAN&gt;" &lt;SPAN style="COLOR: red"&gt;Type&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;Edm.String&lt;/SPAN&gt;" &lt;SPAN style="COLOR: red"&gt;Nullable&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;true&lt;/SPAN&gt;"
            &lt;SPAN style="COLOR: red"&gt;m2:FC_TargetPath&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;EpmSyndicationTitle&lt;/SPAN&gt;"
            &lt;SPAN style="COLOR: red"&gt;m2:FC_ContentKind&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;EpmPlaintext&lt;/SPAN&gt;"
            &lt;SPAN style="COLOR: red"&gt;m2:FC_KeepContent&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;true&lt;/SPAN&gt;" &lt;SPAN style="COLOR: blue"&gt;/&amp;gt;
  &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;Property &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;Name&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;Body&lt;/SPAN&gt;" &lt;SPAN style="COLOR: red"&gt;Type&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;Edm.String&lt;/SPAN&gt;" &lt;SPAN style="COLOR: red"&gt;Nullable&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;true&lt;/SPAN&gt;" &lt;SPAN style="COLOR: blue"&gt;/&amp;gt;
  &amp;lt;!-- &lt;/SPAN&gt;&lt;SPAN style="COLOR: green"&gt;Map the “Author” property to entry:author element  &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;--&amp;gt;
  &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;Property &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;Name&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;Author&lt;/SPAN&gt;" &lt;SPAN style="COLOR: red"&gt;Type&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;Edm.String&lt;/SPAN&gt;" &lt;SPAN style="COLOR: red"&gt;Nullable&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;true&lt;/SPAN&gt;"
            &lt;SPAN style="COLOR: red"&gt;m2:FC_TargetPath&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;EpmSyndicationAuthorName&lt;/SPAN&gt;"
            &lt;SPAN style="COLOR: red"&gt;m2:FC_ContentKind&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;EpmPlaintext&lt;/SPAN&gt;"
            &lt;SPAN style="COLOR: red"&gt;m2:FC_KeepContent&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;true&lt;/SPAN&gt;" &lt;SPAN style="COLOR: blue"&gt;/&amp;gt;
  &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;Property &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;Name&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;BlogPostID&lt;/SPAN&gt;" &lt;SPAN style="COLOR: red"&gt;Type&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;Edm.Int32&lt;/SPAN&gt;" &lt;SPAN style="COLOR: red"&gt;Nullable&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;false&lt;/SPAN&gt;" &lt;SPAN style="COLOR: blue"&gt;/&amp;gt;
  &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;Property &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;Name&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;Published&lt;/SPAN&gt;" &lt;SPAN style="COLOR: red"&gt;Type&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;Edm.DateTime&lt;/SPAN&gt;" &lt;SPAN style="COLOR: red"&gt;Nullable&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;false&lt;/SPAN&gt;" &lt;SPAN style="COLOR: blue"&gt;/&amp;gt;
  &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;Property &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;Name&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;PostURI&lt;/SPAN&gt;" &lt;SPAN style="COLOR: red"&gt;Type&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;Edm.String&lt;/SPAN&gt;" &lt;SPAN style="COLOR: red"&gt;Nullable&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;true&lt;/SPAN&gt;" &lt;SPAN style="COLOR: blue"&gt;/&amp;gt;
  &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;Property &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;Name&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;ContentSummary&lt;/SPAN&gt;" &lt;SPAN style="COLOR: red"&gt;Type&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;Edm.String&lt;/SPAN&gt;" &lt;SPAN style="COLOR: red"&gt;Nullable&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;true&lt;/SPAN&gt;" &lt;SPAN style="COLOR: blue"&gt;/&amp;gt;
  &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;Property &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;Name&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;IconUri&lt;/SPAN&gt;" &lt;SPAN style="COLOR: red"&gt;Type&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;Edm.String&lt;/SPAN&gt;" &lt;SPAN style="COLOR: red"&gt;Nullable&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;true&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;/&amp;gt;
&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;EntityType&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;
&lt;/SPAN&gt;&lt;/PRE&gt;&lt;A href="http://11011.net/software/vspaste" mce_href="http://11011.net/software/vspaste"&gt;&lt;/A&gt;
&lt;P&gt;&lt;STRONG&gt;Special cases &lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;I . Complex type properties&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;[I’ll leave the type definitions as CLR types so that its easier to visualize the relations.] &lt;BR&gt;&lt;BR&gt;Consider the following model , &lt;/P&gt;&lt;PRE class=code&gt;&lt;SPAN style="COLOR: blue"&gt;public class &lt;/SPAN&gt;&lt;SPAN style="COLOR: #2b91af"&gt;Address
    &lt;/SPAN&gt;{
        &lt;SPAN style="COLOR: blue"&gt;public long &lt;/SPAN&gt;DoorNumber { &lt;SPAN style="COLOR: blue"&gt;get&lt;/SPAN&gt;; &lt;SPAN style="COLOR: blue"&gt;set&lt;/SPAN&gt;; }
        &lt;SPAN style="COLOR: blue"&gt;public string &lt;/SPAN&gt;Street { &lt;SPAN style="COLOR: blue"&gt;get&lt;/SPAN&gt;; &lt;SPAN style="COLOR: blue"&gt;set&lt;/SPAN&gt;; }
        &lt;SPAN style="COLOR: blue"&gt;public int &lt;/SPAN&gt;ZipCode { &lt;SPAN style="COLOR: blue"&gt;get&lt;/SPAN&gt;; &lt;SPAN style="COLOR: blue"&gt;set&lt;/SPAN&gt;; }
    }
    [&lt;SPAN style="COLOR: #2b91af"&gt;DataServiceKey&lt;/SPAN&gt;(&lt;SPAN style="COLOR: #a31515"&gt;"CustomerID"&lt;/SPAN&gt;)]
    &lt;SPAN style="COLOR: blue"&gt;public class &lt;/SPAN&gt;&lt;SPAN style="COLOR: #2b91af"&gt;Customer
    &lt;/SPAN&gt;{
        &lt;SPAN style="COLOR: blue"&gt;public int &lt;/SPAN&gt;CustomerID { &lt;SPAN style="COLOR: blue"&gt;get&lt;/SPAN&gt;; &lt;SPAN style="COLOR: blue"&gt;set&lt;/SPAN&gt;; }
        &lt;SPAN style="COLOR: blue"&gt;public &lt;/SPAN&gt;&lt;SPAN style="COLOR: #2b91af"&gt;Address &lt;/SPAN&gt;myAddress { &lt;SPAN style="COLOR: blue"&gt;get&lt;/SPAN&gt;; &lt;SPAN style="COLOR: blue"&gt;set&lt;/SPAN&gt;; }
    }&lt;/PRE&gt;&lt;A href="http://11011.net/software/vspaste" mce_href="http://11011.net/software/vspaste"&gt;&lt;/A&gt;
&lt;P&gt;&lt;BR&gt;and lets say that you wanted to map the property Street of the complex type Address when accessed through the &lt;BR&gt;entity type “Customer”&amp;nbsp; to the atom:title element ,&lt;/P&gt;
&lt;P&gt;this can be achieved via setting the &lt;STRONG&gt;EpmSourcePath &lt;/STRONG&gt;property to “Street”&amp;nbsp; . &lt;BR&gt;In this case , the Epm markup would look like this :&lt;/P&gt;&lt;PRE class=code&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;EntityType &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;Name&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;Customer&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;&amp;gt;
  &amp;lt;!-- &lt;/SPAN&gt;&lt;SPAN style="COLOR: green"&gt;Map the Street property of the Address complex type to the entry:title element &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;--&amp;gt;
  &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;Property &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;Name&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;myAddress&lt;/SPAN&gt;" &lt;SPAN style="COLOR: red"&gt;Type&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;MyModelNamespace.Address&lt;/SPAN&gt;"
&lt;STRONG&gt;            &lt;SPAN style="COLOR: red"&gt;me:EpmSourcePath&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;Street&lt;/SPAN&gt;"
&lt;/STRONG&gt;            &lt;SPAN style="COLOR: red"&gt;m2:FC_Atom&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;true&lt;/SPAN&gt;"
            &lt;SPAN style="COLOR: red"&gt;m2:FC_TargetPath&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;EpmSyndicationTitle&lt;/SPAN&gt;"
            &lt;SPAN style="COLOR: red"&gt;m2:FC_ContentKind&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;EpmPlaintext&lt;/SPAN&gt;"
            &lt;SPAN style="COLOR: red"&gt;m2:FC_KeepContent&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;true&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;/&amp;gt;
  &amp;lt;!-- &lt;/SPAN&gt;&lt;SPAN style="COLOR: green"&gt;other properties removed for brevity&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;--&amp;gt;
&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;EntityType&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;A href="http://11011.net/software/vspaste" mce_href="http://11011.net/software/vspaste"&gt;&lt;/A&gt;&lt;A href="http://11011.net/software/vspaste" mce_href="http://11011.net/software/vspaste"&gt;&lt;/A&gt;&lt;A href="http://11011.net/software/vspaste" mce_href="http://11011.net/software/vspaste"&gt;&lt;/A&gt;&lt;A href="http://11011.net/software/vspaste" mce_href="http://11011.net/software/vspaste"&gt;&lt;/A&gt;&lt;A href="http://11011.net/software/vspaste" mce_href="http://11011.net/software/vspaste"&gt;&lt;/A&gt;
&lt;P&gt;&lt;STRONG&gt;II Mapping properties declared&amp;nbsp; on base type &lt;BR&gt;&lt;BR&gt;&lt;/STRONG&gt;Consider this data model :&lt;/P&gt;&lt;PRE class=code&gt;[&lt;SPAN style="COLOR: #2b91af"&gt;DataServiceKey&lt;/SPAN&gt;(&lt;SPAN style="COLOR: #a31515"&gt;"CustomerID"&lt;/SPAN&gt;)]
&lt;SPAN style="COLOR: blue"&gt;public class &lt;/SPAN&gt;&lt;SPAN style="COLOR: #2b91af"&gt;Customer
&lt;/SPAN&gt;{
        &lt;SPAN style="COLOR: blue"&gt;public int &lt;/SPAN&gt;CustomerID { &lt;SPAN style="COLOR: blue"&gt;get&lt;/SPAN&gt;; &lt;SPAN style="COLOR: blue"&gt;set&lt;/SPAN&gt;; }
        &lt;SPAN style="COLOR: blue"&gt;public &lt;/SPAN&gt;&lt;SPAN style="COLOR: #2b91af"&gt;Address &lt;/SPAN&gt;myAddress { &lt;SPAN style="COLOR: blue"&gt;get&lt;/SPAN&gt;; &lt;SPAN style="COLOR: blue"&gt;set&lt;/SPAN&gt;; }
        &lt;SPAN style="COLOR: blue"&gt;public string &lt;/SPAN&gt;BaseTypeField { &lt;SPAN style="COLOR: blue"&gt;get&lt;/SPAN&gt;; &lt;SPAN style="COLOR: blue"&gt;set&lt;/SPAN&gt;; }
}

&lt;SPAN style="COLOR: blue"&gt;public class &lt;/SPAN&gt;&lt;SPAN style="COLOR: #2b91af"&gt;DerivedCustomer &lt;/SPAN&gt;: &lt;SPAN style="COLOR: #2b91af"&gt;Customer
&lt;/SPAN&gt;{
  &lt;SPAN style="COLOR: blue"&gt;public string &lt;/SPAN&gt;DerivedTypeField { &lt;SPAN style="COLOR: blue"&gt;get&lt;/SPAN&gt;; &lt;SPAN style="COLOR: blue"&gt;set&lt;/SPAN&gt;; }
}&lt;/PRE&gt;and you want to map a property declared on the Base type “Customer” on the derived type “DerivedCustomer” &lt;BR&gt;The EPM Markup would look like this : &lt;PRE class=code&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;lt;!-- &lt;/SPAN&gt;&lt;SPAN style="COLOR: green"&gt;Map the "BaseTypeField" property of the base type "Customer" to the entry:title element &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;--&amp;gt;
&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;EntityType &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;Name&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;DerivedCustomer&lt;/SPAN&gt;" &lt;SPAN style="COLOR: red"&gt;BaseType&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;MyModelNamespace.Customer&lt;/SPAN&gt;"
&lt;STRONG&gt;            &lt;SPAN style="COLOR: red"&gt;m2:FC_SourcePath&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;BaseTypeField&lt;/SPAN&gt;"
&lt;/STRONG&gt;            &lt;SPAN style="COLOR: red"&gt;m2:FC_TargetPath&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;EpmSyndicationAuthorName&lt;/SPAN&gt;"
            &lt;SPAN style="COLOR: red"&gt;m2:FC_ContentKind&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;EpmPlaintext&lt;/SPAN&gt;"
            &lt;SPAN style="COLOR: red"&gt;m2:FC_KeepContent&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;true&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;&amp;gt;
  &amp;lt;!-- &lt;/SPAN&gt;&lt;SPAN style="COLOR: green"&gt;other properties removed for brevity&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;--&amp;gt;
&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;EntityType&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;A href="http://11011.net/software/vspaste" mce_href="http://11011.net/software/vspaste"&gt;&lt;/A&gt;&lt;A href="http://11011.net/software/vspaste" mce_href="http://11011.net/software/vspaste"&gt;&lt;/A&gt;&lt;STRONG&gt;&lt;/STRONG&gt;
&lt;P&gt;&lt;STRONG&gt;Considerations for location&amp;nbsp; of EPM markup in EDM Schema&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Use the following guidelines to decide where in the EDM Schema you should add the attribute for either ATOM or custom Mappings,&lt;/P&gt;
&lt;TABLE border=0 cellSpacing=0 cellPadding=2 width=736&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=292&gt;&lt;STRONG&gt;Where is property defined ?&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=305&gt;&lt;STRONG&gt;Where do I apply the EPM attribute?&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=137&gt;&lt;STRONG&gt;SourcePath &lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=292&gt;Simple property on the Entity Type &lt;BR&gt;ex: &lt;BR&gt;“Title” property of “BlogPost” type above&lt;/TD&gt;
&lt;TD vAlign=top width=305&gt;&amp;lt;Property&amp;gt; node in the &amp;lt;Entitytype&amp;gt; markup&lt;/TD&gt;
&lt;TD vAlign=top width=137&gt;Not required&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=292&gt;Simple property on entity’s base type&lt;/TD&gt;
&lt;TD vAlign=top width=305&gt;&amp;lt;EntityType&amp;gt; node &lt;/TD&gt;
&lt;TD vAlign=top width=137&gt;Base type property name&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=292&gt;Complex Property on the Entity Type&lt;/TD&gt;
&lt;TD vAlign=top width=305&gt;Complex Types cannot be mapped directly &lt;/TD&gt;
&lt;TD vAlign=top width=137&gt;N/A&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=292&gt;Simple property defined on complex type which is a property on an Entity Type&lt;/TD&gt;
&lt;TD vAlign=top width=305&gt;&amp;lt;Property&amp;gt; node in the &amp;lt;EntityType&amp;gt; &lt;/TD&gt;
&lt;TD vAlign=top width=137&gt;Complex type’s simple property name&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;
&lt;P&gt;Hope you enjoyed this post about applying Friendly Feeds mappings to EDMdata models. &lt;BR&gt;The second part of this post will discuss more special cases in EDM Models and troubleshooting failing mappings &lt;BR&gt;and also a sample project for EDM Friendly Feeds Mappings.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9516348" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/msdn/nbTP/~4/jmbYb9q8OV0" height="1" width="1"/&gt;</content><author><name>PhaniRajuYN</name><uri>http://blogs.msdn.com/members/PhaniRajuYN.aspx</uri></author><category term="Astoria" scheme="http://blogs.msdn.com/phaniraj/archive/tags/Astoria/default.aspx" /><category term="Documentation" scheme="http://blogs.msdn.com/phaniraj/archive/tags/Documentation/default.aspx" /><category term="Friendly Feeds" scheme="http://blogs.msdn.com/phaniraj/archive/tags/Friendly+Feeds/default.aspx" /><feedburner:origLink>http://blogs.msdn.com/phaniraj/archive/2009/03/28/ado-net-data-services-friendly-feeds-mapping-edm-types-i.aspx</feedburner:origLink></entry><entry><title>Versioning note , writing SL 3.0 applications with Astoria v1.5 Sl 2.0 SDK Library</title><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/msdn/nbTP/~3/1r9JSffPwZ4/versioning-note-writing-sl-3-0-applications-with-astoria-v1-5-sl-2-0-sdk-library.aspx" /><id>http://blogs.msdn.com/phaniraj/archive/2009/03/25/versioning-note-writing-sl-3-0-applications-with-astoria-v1-5-sl-2-0-sdk-library.aspx</id><published>2009-03-25T05:30:00Z</published><updated>2009-03-25T05:30:00Z</updated><content type="html">&lt;P&gt;As part&amp;nbsp; of the v1.5 install, we also shipped a Silverlight 2.0 SDK library that is capable of talking to a v1.5 Astoria Service. &lt;BR&gt;&lt;BR&gt;&lt;STRONG&gt;Did you know that you could use the Silverlight 2.0 client library we shipped as part of our v1.5 CTP1 release in Silverlight 3.0 applications?&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;From a Silverlight SDK library point of view ,to use &lt;A href="http://blogs.msdn.com/MFlasko" mce_href="http://blogs.msdn.com/MFlasko"&gt;Mike Flasko’s&lt;/A&gt; words, ”we are nothing but user code”. &lt;BR&gt;We have no dependencies on the Runtime that have changed in SL 3.0 , &lt;STRONG&gt;&lt;EM&gt;yet&lt;/EM&gt;&lt;/STRONG&gt;. &lt;BR&gt;So , you can use the Silverlight 2.0 SDK library that we shipped in v1.5 CTP1 , by &lt;BR&gt;replacing the reference to “System.Data.Services.Client.dll” with “Microsoft.Data.Services.Client.dll”&lt;/P&gt;
&lt;P&gt;In your Silverlight project , &lt;BR&gt;&lt;BR&gt;1. If you already have a reference to “System.Data.Services.Client.dll” in your SIlverlight application , remove it .&lt;/P&gt;
&lt;P&gt;2. If you have the v1.5 CTP1 installed , the Silverlight client binaries are stored in the following location , &lt;BR&gt;&lt;SPAN style="BACKGROUND-COLOR: #ffcc00"&gt;%ProgramFiles%\ADO.NET Data Services V1.5 CTP1\sl_bin&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;3. Bring up the “Add Reference” window by right clicking the “References” node for the Silverlight 3.0 Project in Visual Studio.&lt;/P&gt;
&lt;P&gt;4. Use the “Browse” tab of the “Add Reference” window to browse to this location to add a reference to “Microsoft.Data.Services.Client.dll”.&lt;/P&gt;
&lt;P&gt;5. Rebuild and run the app . &lt;BR&gt;&lt;/P&gt;&lt;A&gt;&lt;/A&gt;
&lt;P&gt;&lt;STRONG&gt;What about Code-gen , &lt;BR&gt;&lt;/STRONG&gt;&lt;STRONG&gt;Can I point the Silverlight 3.0 application at a v1.5 CTP1 service and get all the binding &amp;amp; Friendly Feeds mappings generated in the Client types?&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;No &lt;/STRONG&gt;, there is no integration for v1.5 codegeneration tools in Visual Studio for Sl 3.0 Projects . &lt;BR&gt;You will have to use the DataSvcUtil.exe tool from the following directory manually to generate the types with binding information for SL 3.0 projects .&lt;/P&gt;
&lt;P&gt;Location for DataSvcUtil.exe : &lt;SPAN style="BACKGROUND-COLOR: #ffcc00"&gt;%ProgramFiles%\ADO.NET Data Services V1.5 CTP1\bin&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;From a runtime perspective , is there any functionality in the v1.5 SL 2.0 library that is not present when the dll is inside a xap built with SL 3.0 tools ?&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;No , none , everything should just work . If something doesn’t work , please leave a comment on this post or write to me at PhaniRaj At Microsoft Dot Com.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;What about Silverlight 3 Out-Of-Browser applications ?&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;The Astoria Silverlight client library doesn’t yet work with Out of the Browser Silverlight applications.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9506125" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/msdn/nbTP/~4/1r9JSffPwZ4" height="1" width="1"/&gt;</content><author><name>PhaniRajuYN</name><uri>http://blogs.msdn.com/members/PhaniRajuYN.aspx</uri></author><category term="Astoria" scheme="http://blogs.msdn.com/phaniraj/archive/tags/Astoria/default.aspx" /><category term="Documentation" scheme="http://blogs.msdn.com/phaniraj/archive/tags/Documentation/default.aspx" /><category term="Versioning" scheme="http://blogs.msdn.com/phaniraj/archive/tags/Versioning/default.aspx" /><feedburner:origLink>http://blogs.msdn.com/phaniraj/archive/2009/03/25/versioning-note-writing-sl-3-0-applications-with-astoria-v1-5-sl-2-0-sdk-library.aspx</feedburner:origLink></entry><entry><title>ADO.NET Data Services Silverlight Project Error : System.IO.FileNotFoundException</title><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/msdn/nbTP/~3/TQQoCLpCBOg/ado-net-data-services-silverlight-project-error-system-io-filenotfoundexception.aspx" /><id>http://blogs.msdn.com/phaniraj/archive/2009/03/24/ado-net-data-services-silverlight-project-error-system-io-filenotfoundexception.aspx</id><published>2009-03-24T05:09:18Z</published><updated>2009-03-24T05:09:18Z</updated><content type="html">&lt;p&gt;Imagine this , you just downloaded the Astoria V1.5 CTP1 and are happily chugging along and decide to make a Silverlight Project    &lt;br /&gt;that uses the latest Silverlight client library to make some cool app.     &lt;br /&gt;You open an existing Silverlight app&amp;#160; /create a new Silverlight app ,     &lt;br /&gt;and generate the client types by running “Add Service Reference” from Visual Studio.     &lt;br /&gt;and write some code in the app and hit F5 to run the app .     &lt;br /&gt;Now , Instead of seeing the poetic beauty that is a Silverlight app built with Astoria , you see this : &lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/phaniraj/WindowsLiveWriter/cf33f5160cc9_FD05/M_D_S_C_Unhandled_Exception.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="M_D_S_C_Unhandled_Exception" border="0" alt="M_D_S_C_Unhandled_Exception" src="http://blogs.msdn.com/blogfiles/phaniraj/WindowsLiveWriter/cf33f5160cc9_FD05/M_D_S_C_Unhandled_Exception_thumb.png" width="439" height="484" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;The Exception message is : &lt;/p&gt;  &lt;p&gt;System.IO.FileNotFoundException occurred    &lt;br /&gt;&amp;#160; Message=&amp;quot;Could not load file or assembly 'Microsoft.Data.Services.Client, Version=2.0.5.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; The system cannot find the file specified.&amp;quot;     &lt;br /&gt;&amp;#160; StackTrace:     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; at SilverlightProject1.Page..ctor()     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; at SilverlightProject1.App.Application_Startup(Object sender, StartupEventArgs e)     &lt;br /&gt;&amp;#160; InnerException: &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;strong&gt;What just happened ?&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;When the tools which generate the client code for an Astoria Service for Silverlight applications ran , they added a reference to the new client dll,    &lt;br /&gt;Microsoft.Data.Services.Client.dll with “Copy Local” set to false.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/phaniraj/WindowsLiveWriter/cf33f5160cc9_FD05/M_D_S_C_Silverlight_Reference_1.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="M_D_S_C_Silverlight_Reference" border="0" alt="M_D_S_C_Silverlight_Reference" src="http://blogs.msdn.com/blogfiles/phaniraj/WindowsLiveWriter/cf33f5160cc9_FD05/M_D_S_C_Silverlight_Reference_thumb_1.png" width="276" height="484" /&gt;&lt;/a&gt; &lt;/p&gt; If your code looks like this,   &lt;pre class="code"&gt;&lt;span style="color: blue"&gt;public &lt;/span&gt;Page(){
InitializeComponent();
nwServiceReference.&lt;span style="color: #2b91af"&gt;BlogServiceProvider &lt;/span&gt;prov =
                &lt;span style="color: blue"&gt;new &lt;/span&gt;SilverlightProject1.nwServiceReference.&lt;span style="color: #2b91af"&gt;BlogServiceProvider&lt;/span&gt;(&lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Uri&lt;/span&gt;(&lt;span style="color: #a31515"&gt;&amp;quot;http://ServiceEndPoint&amp;quot;&lt;/span&gt;));
}&lt;/pre&gt;
&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;

&lt;p&gt;When the JIT compiler compiles your Page() constructor method, it scans the method, sees that it references a type named &lt;span style="color: #2b91af"&gt;BlogServiceProvider &lt;/span&gt;, and attempts to load Microsoft.Data.Services.Client.dll so that the reference can be resolved. 

  &lt;br /&gt;Now , Since we set Copy Local to false , the Client DLL is not copied into the XAP file ,and the Silverlight CLR cannot find the file , it throws the above exception. 

  &lt;br /&gt;We can verify by opening the xap file in winrar or some other archiving utility. 

  &lt;br /&gt;&lt;a href="http://blogs.msdn.com/blogfiles/phaniraj/WindowsLiveWriter/cf33f5160cc9_FD05/Xap_No_CLient_Library.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Xap_No_CLient_Library" border="0" alt="Xap_No_CLient_Library" src="http://blogs.msdn.com/blogfiles/phaniraj/WindowsLiveWriter/cf33f5160cc9_FD05/Xap_No_CLient_Library_thumb.png" width="644" height="327" /&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Resolution :&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In your Silverlight project, for the reference to “'Microsoft.Data.Services.Client.dll” ,&amp;#160; Set “Copy Local” to “True” and rebuild your Silverlight XAP. 
  &lt;br /&gt;

  &lt;br /&gt;&lt;strong&gt;What about “Update Service Reference”? 
    &lt;br /&gt;&lt;/strong&gt;Same issue , follow same resolution.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;When will this be fixed? 
    &lt;br /&gt;&lt;/strong&gt;We are tracking this issue and will release a fix in a future release of ADO.NET Data Services v1.5 &lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9503162" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/msdn/nbTP/~4/TQQoCLpCBOg" height="1" width="1"/&gt;</content><author><name>PhaniRajuYN</name><uri>http://blogs.msdn.com/members/PhaniRajuYN.aspx</uri></author><category term="Astoria" scheme="http://blogs.msdn.com/phaniraj/archive/tags/Astoria/default.aspx" /><category term="Documentation" scheme="http://blogs.msdn.com/phaniraj/archive/tags/Documentation/default.aspx" /><category term="Silverlight" scheme="http://blogs.msdn.com/phaniraj/archive/tags/Silverlight/default.aspx" /><feedburner:origLink>http://blogs.msdn.com/phaniraj/archive/2009/03/24/ado-net-data-services-silverlight-project-error-system-io-filenotfoundexception.aspx</feedburner:origLink></entry></feed>
