<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Diego Vega : Entity Framework Databinding</title><link>http://blogs.msdn.com/diego/archive/tags/Entity+Framework+Databinding/default.aspx</link><description>Tags: Entity Framework Databinding</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>EntityDataSource's flattening of complex type properties</title><link>http://blogs.msdn.com/diego/archive/2008/05/24/entitydatasource-s-flattening-of-complex-type-properties.aspx</link><pubDate>Sat, 24 May 2008 20:11:40 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8548086</guid><dc:creator>divega</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/diego/comments/8548086.aspx</comments><wfw:commentRss>http://blogs.msdn.com/diego/commentrss.aspx?PostID=8548086</wfw:commentRss><wfw:comment>http://blogs.msdn.com/diego/rsscomments.aspx?PostID=8548086</wfw:comment><description>&lt;p&gt;I explained a few days ago the rules of wrapping in &lt;a href="http://blogs.msdn.com/diego/archive/2008/05/13/entitydatasource-to-wrap-or-not-to-wrap.aspx"&gt;this blog post&lt;/a&gt;. But why do we wrap after all?&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.thedatafarm.com/blog"&gt;Julie&lt;/a&gt; &lt;a href="http://forums.microsoft.com/Forums/ShowPost.aspx?PostID=3395595&amp;amp;SiteID=1&amp;amp;mode=1"&gt;asked&lt;/a&gt; for some details today in the forums. I think the answer is worth of a blog post. &lt;/p&gt;  &lt;p&gt;In ASP.NET there are different ways of specifying which property a databound control binds to: Eval() Bind(), BoundField.DataField, ListControl.DataTextField, etc. In general, they behave differently. &lt;/p&gt;  &lt;p&gt;The flattening we did on EntityDataSource is an attempt to make the properties that are exposed by EDM entities available for 2-way databinding in most of those cases. &lt;/p&gt;  &lt;p&gt;For instance, for a customer that has a complex property of type Address, we provide a property descriptor for customer.Address, and also for customer.Address.Street, customer.Address.Number, etc.&lt;/p&gt;  &lt;p&gt;At runtime, in the case of a control binding to Eval(&amp;#8220;Address.Street&amp;#8221;) from a customer, Eval will use the property descriptor corresponding to Address, and it will drill down on it to extract the value of the Street property on it. &lt;/p&gt;  &lt;p&gt;A grid column of a BoundField derived type with DataField = &amp;#8220;Address.Street&amp;#8221; will work differently: it will just look for a property descriptor in the data item with a name as &amp;#8220;Address.Street&amp;#8221;. In fact, EntityDataSource is the first DataSource control that I know off that will provide such a thing. &lt;/p&gt;  &lt;p&gt;Bind(&amp;#8220;Address.Street&amp;#8221;) will work in a similar fashion to Eval() when reading the properties into the data bound control, but will act a little bit more like BoundField when sending back changes to the DataSource.&lt;/p&gt;  &lt;p&gt;There are a few cases in which the behavior is not any of the above and hence you end up with a control that cannot have access to a complex type&amp;#8217;s properties. You can expect us to work closely with the ASP.NET team in making the experience smoother in future versions. But for the time being, what you can do is create an explicit projection of the properties. For instance, in Entity SQL:&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0pt; line-height: normal; mso-layout-grid-align: none"&gt;&lt;span style="font-size: 10pt; font-family: consolas; mso-bidi-font-family: &amp;#39;Courier New&amp;#39;; mso-no-proof: yes"&gt;&lt;span style="mso-tab-count: 1"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color: blue"&gt;SELECT&lt;/span&gt; c&lt;span style="color: gray"&gt;.&lt;/span&gt;ContactId&lt;span style="color: gray"&gt;,&lt;/span&gt; c&lt;span style="color: gray"&gt;.&lt;/span&gt;Address&lt;span style="color: gray"&gt;.&lt;/span&gt;Street &lt;span style="color: blue"&gt;AS&lt;/span&gt; Street&amp;#160; &lt;br /&gt;&amp;#160; &lt;/span&gt;&lt;span style="font-size: 10pt; line-height: 115%; font-family: consolas; mso-bidi-font-family: &amp;#39;Courier New&amp;#39;; mso-no-proof: yes"&gt;&lt;span style="mso-tab-count: 1"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color: blue"&gt;FROM&lt;/span&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;#160;&amp;#160; &lt;/span&gt;Northwind&lt;span style="color: gray"&gt;.&lt;/span&gt;Customers &lt;span style="color: blue"&gt;AS&lt;/span&gt; c&lt;/span&gt;&lt;span style="font-family: consolas"&gt;     &lt;p&gt;&lt;/p&gt;   &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;I think it is worthy of mentioning: &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Remember flattening of complex properties only happen under certain conditions (see &lt;a href="http://blogs.msdn.com/diego/archive/2008/05/13/entitydatasource-to-wrap-or-not-to-wrap.aspx"&gt;wrapping&lt;/a&gt;). &lt;/li&gt;    &lt;li&gt;We worked very closely with the &lt;a href="http://www.asp.net/dynamicdata/"&gt;ASP.NET Dynamic Data&lt;/a&gt; in this release, to enable their technology to work EDM through the EntityDataSource. I think it is very worthy of trying. &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Hope this helps.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8548086" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/diego/archive/tags/EntityDataSource/default.aspx">EntityDataSource</category><category domain="http://blogs.msdn.com/diego/archive/tags/Entity+Framework+Databinding/default.aspx">Entity Framework Databinding</category></item><item><title>EntityDataSource: To wrap or not to wrap</title><link>http://blogs.msdn.com/diego/archive/2008/05/13/entitydatasource-to-wrap-or-not-to-wrap.aspx</link><pubDate>Tue, 13 May 2008 21:08:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8501057</guid><dc:creator>divega</dc:creator><slash:comments>6</slash:comments><comments>http://blogs.msdn.com/diego/comments/8501057.aspx</comments><wfw:commentRss>http://blogs.msdn.com/diego/commentrss.aspx?PostID=8501057</wfw:commentRss><wfw:comment>http://blogs.msdn.com/diego/rsscomments.aspx?PostID=8501057</wfw:comment><description>&lt;P&gt;&lt;STRONG&gt;Note:&lt;/STRONG&gt;&amp;nbsp;Somehow the &amp;lt;TEntity&amp;gt; generic argument had disappeared from the extension method definition. I am fixing it today after several months. Sorry for the inconvenience!&lt;/P&gt;
&lt;P&gt;Fresh from the forums today: A customer &lt;A href="http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=3335738&amp;amp;SiteID=1&amp;amp;mode=1" mce_href="http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=3335738&amp;amp;SiteID=1&amp;amp;mode=1"&gt;asks&lt;/A&gt; how to get the real entity object in the RowDataBound event of a GridView.&lt;/P&gt;
&lt;P&gt;We made some complex design decisions during the development of the EntityDataSource, and I guess that will give us plenty of material for blogging :)&lt;/P&gt;
&lt;P&gt;With the EntityDataSource, we faced the interesting problem of building a bridge between the existing ASP.NET databinding infrastructure and the world of EDM. One of the techniques we use to solve the problem is wrapping entities in smart databinding objects. As &lt;A href="http://blogs.msdn.com/meek/" mce_href="http://blogs.msdn.com/meek/"&gt;Colin&lt;/A&gt; explains it in his answer posted to the forums:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;Why are you seeing a wrapper instead of the entity? Some of the unique features of the Entity Data Model prevent us from directly binding the entity. For instance, when inserting a Product I also need to insert a relationship to a Category. The wrapper adds the relationship to the entity, basically as a foreign key value.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;The wrapper object implements the ICustomTypeDescriptor interface, which makes it work well with databinding, but when you try to get your original entity object, for instance form the arguments of the RowDataBound, you will get a wrapper object instead of the entity object you are expecting.&lt;/P&gt;
&lt;P&gt;I don't want to make things much more complicated than they need to be, but I think the generic solution may be useful for some customers. &lt;/P&gt;
&lt;P&gt;First of all, here are the rules for wrapping:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;
&lt;P&gt;The wrapping mechanism only takes place if you initialize your EntityDataSource using EntitySetName. &lt;/P&gt;
&lt;LI&gt;
&lt;P&gt;When you instead set CommandText to a query that returns entities (i.e. "SELECT VALUE c FROM Northwind.Customers AS c", then you get normal entities. &lt;/P&gt;
&lt;LI&gt;
&lt;P&gt;When you instead set CommandText to a query that returns a projection of properties (i.e. "SELECT c.CustomerID, c.CustomerName FROM Northwind.Customers AS c"), then you get a DbDataRecord.&lt;/P&gt;
&lt;LI&gt;
&lt;P&gt;Finally, if you set the Select property to do a projection (i.e. "it.CustomerID, it.CustomerName", you get DbDataRecord regardless of how you start your query.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;If you use the RowDataBound event very often in your code, then, I would suggest having around some code similar to this (thanks &lt;A href="http://blogs.msdn.com/davidebb/" mce_href="http://blogs.msdn.com/davidebb/"&gt;David&lt;/A&gt; for coming up with this code first):&lt;/P&gt;
&lt;DIV class=codeseg&gt;
&lt;DIV class=codecontent&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt" class=MsoNormal align=left&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 8pt"&gt;static&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; FONT-SIZE: 8pt"&gt; &lt;SPAN style="COLOR: blue"&gt;class&lt;/SPAN&gt; &lt;SPAN style="COLOR: #2b91af"&gt;EntityDataSourceExtensions&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt" class=MsoNormal align=left&gt;&lt;SPAN style="FONT-FAMILY: consolas; FONT-SIZE: 8pt"&gt;{&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt" class=MsoNormal align=left&gt;&lt;SPAN style="FONT-FAMILY: consolas; FONT-SIZE: 8pt"&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;public&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;static&lt;/SPAN&gt; &lt;FONT color=#2b91af&gt;TEntity&lt;/FONT&gt; GetItemObject&amp;lt;&lt;FONT color=#2b91af&gt;TEntity&amp;gt;&lt;/FONT&gt;(&lt;SPAN style="COLOR: blue"&gt;object&lt;/SPAN&gt; dataItem) &lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt" class=MsoNormal align=left&gt;&lt;SPAN style="FONT-FAMILY: consolas; FONT-SIZE: 8pt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: blue"&gt;where&lt;/SPAN&gt; TEntity : &lt;SPAN style="COLOR: blue"&gt;class&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt" class=MsoNormal align=left&gt;&lt;SPAN style="FONT-FAMILY: consolas; FONT-SIZE: 8pt"&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;{&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt" class=MsoNormal align=left&gt;&lt;SPAN style="FONT-FAMILY: consolas; FONT-SIZE: 8pt"&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;var&lt;/SPAN&gt; entity = dataItem &lt;SPAN style="COLOR: blue"&gt;as&lt;/SPAN&gt; &lt;FONT color=#2b91af&gt;TEntity&lt;/FONT&gt;;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt" class=MsoNormal align=left&gt;&lt;SPAN style="FONT-FAMILY: consolas; FONT-SIZE: 8pt"&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;if&lt;/SPAN&gt; (entity != &lt;SPAN style="COLOR: blue"&gt;null&lt;/SPAN&gt;)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt" class=MsoNormal align=left&gt;&lt;SPAN style="FONT-FAMILY: consolas; FONT-SIZE: 8pt"&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;{&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt" class=MsoNormal align=left&gt;&lt;SPAN style="FONT-FAMILY: consolas; FONT-SIZE: 8pt"&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;return&lt;/SPAN&gt; entity;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt" class=MsoNormal align=left&gt;&lt;SPAN style="FONT-FAMILY: consolas; FONT-SIZE: 8pt"&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt" class=MsoNormal align=left&gt;&lt;SPAN style="FONT-FAMILY: consolas; FONT-SIZE: 8pt"&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;var&lt;/SPAN&gt; td = dataItem &lt;SPAN style="COLOR: blue"&gt;as&lt;/SPAN&gt; &lt;SPAN style="COLOR: #2b91af"&gt;ICustomTypeDescriptor&lt;/SPAN&gt;;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt" class=MsoNormal align=left&gt;&lt;SPAN style="FONT-FAMILY: consolas; FONT-SIZE: 8pt"&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;if&lt;/SPAN&gt; (td != &lt;SPAN style="COLOR: blue"&gt;null&lt;/SPAN&gt;)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt" class=MsoNormal align=left&gt;&lt;SPAN style="FONT-FAMILY: consolas; FONT-SIZE: 8pt"&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;{&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt" class=MsoNormal align=left&gt;&lt;SPAN style="FONT-FAMILY: consolas; FONT-SIZE: 8pt"&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;return&lt;/SPAN&gt; (&lt;FONT color=#2b91af&gt;TEntity&lt;/FONT&gt;)td.GetPropertyOwner(&lt;SPAN style="COLOR: blue"&gt;null&lt;/SPAN&gt;);&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt" class=MsoNormal align=left&gt;&lt;SPAN style="FONT-FAMILY: consolas; FONT-SIZE: 8pt"&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt" class=MsoNormal align=left&gt;&lt;SPAN style="FONT-FAMILY: consolas; FONT-SIZE: 8pt"&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;return&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;null&lt;/SPAN&gt;;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt" class=MsoNormal align=left&gt;&lt;SPAN style="FONT-FAMILY: consolas; FONT-SIZE: 8pt"&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 10pt" class=MsoNormal align=left&gt;&lt;SPAN style="LINE-HEIGHT: 115%; FONT-FAMILY: consolas; FONT-SIZE: 8pt"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/FORM&gt;
&lt;P&gt;And this is the usage:&lt;/P&gt;
&lt;DIV class=codeseg&gt;
&lt;DIV class=codecontent&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt" class=MsoNormal align=left&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9pt"&gt;protected&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; FONT-SIZE: 9pt"&gt; &lt;SPAN style="COLOR: blue"&gt;void&lt;/SPAN&gt; GridView_RowDataBound(&lt;SPAN style="COLOR: blue"&gt;object&lt;/SPAN&gt; sender, GridViewRowEventArgs e)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt" class=MsoNormal align=left&gt;&lt;SPAN style="FONT-FAMILY: consolas; FONT-SIZE: 9pt"&gt;{&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt" class=MsoNormal align=left&gt;&lt;SPAN style="FONT-FAMILY: consolas; FONT-SIZE: 9pt"&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;var&lt;/SPAN&gt; entity = &lt;SPAN style="COLOR: #2b91af"&gt;EntityDataSourceExtensions&lt;/SPAN&gt;.GetItemObject&amp;lt;&lt;SPAN style="COLOR: #2b91af"&gt;Product&lt;/SPAN&gt;&amp;gt;(e.Row.DataItem);&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt" class=MsoNormal align=left&gt;&lt;SPAN style="FONT-FAMILY: consolas; FONT-SIZE: 9pt"&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: green"&gt;//...&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt" class=MsoNormal align=left&gt;&lt;SPAN style="FONT-FAMILY: consolas; FONT-SIZE: 9pt"&gt;}&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt" class=MsoNormal align=left&gt;&lt;SPAN style="FONT-FAMILY: consolas; FONT-SIZE: 9pt"&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt" class=MsoNormal align=left&gt;I hope this will help some. &lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8501057" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/diego/archive/tags/EntityDataSource/default.aspx">EntityDataSource</category><category domain="http://blogs.msdn.com/diego/archive/tags/Entity+Framework+Databinding/default.aspx">Entity Framework Databinding</category></item></channel></rss>