<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
  <channel>
    <title>Joël Hébert | Opulent ASP Development Inc. - Entity Framework</title>
    <link>http://www.opulentasp.com/</link>
    <description>Enterprise ASP.NET</description>
    <language>en-us</language>
    <copyright>Opulent ASP Development Inc.</copyright>
    <lastBuildDate>Sun, 03 May 2009 12:05:06 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 2.0.7226.0</generator>
    <managingEditor>joel.hebert@opulentasp.com</managingEditor>
    <webMaster>joel.hebert@opulentasp.com</webMaster>
    <item>
      <trackback:ping>http://www.opulentasp.com/Trackback.aspx?guid=4b1a38cf-e1ae-4acf-b3db-25498b4fc2a1</trackback:ping>
      <pingback:server>http://www.opulentasp.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.opulentasp.com/PermaLink,guid,4b1a38cf-e1ae-4acf-b3db-25498b4fc2a1.aspx</pingback:target>
      <dc:creator>Joel Hebert</dc:creator>
      <wfw:comment>http://www.opulentasp.com/CommentView,guid,4b1a38cf-e1ae-4acf-b3db-25498b4fc2a1.aspx</wfw:comment>
      <wfw:commentRss>http://www.opulentasp.com/SyndicationService.asmx/GetEntryCommentsRss?guid=4b1a38cf-e1ae-4acf-b3db-25498b4fc2a1</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Yesterday I had the pleasure to present at the Ottawa Code Camp.I showcased something
quite interesting and got alot of feedback on it.<br /><br /><img height="160" width="250" src="http://farm4.static.flickr.com/3663/3494469323_7e1747f6e8.jpg?v=0" /><br /><br />
In Entity Framework you can stronly type your linq to sql includes by adding Extension
Methods. I found just methods as I was perusing the net one day. 
<br /><br /><a href="&#xA;http://msmvps.com/blogs/matthieu/archive/2008/06/06/entityframework-include-with-func.aspx">Extension
Method</a><br /><br />
Later on I discovered that the possiblitily to daisy chaine these strongly typed incudes
could be done by daisy chaining lambda expressions. .This can be acheived with this
Extension Method from the same author. 
<br /><br /><a href="&#xA;http://msmvps.com/blogs/matthieu/archive/2008/06/06/entity-framework-include-with-func-next.aspx">Extension
Method for multiple includes</a><br /><br />
The lesson to retain is that the compilation is going to catch the erroneous fields
if they are altered or missing , and not the user at run-time. 
<br /><br />
Here is the semantical variance: 
<br /><br />
NORTHWNDEntities ctx = new NORTHWNDEntities(); 
<br /><br /><b>var Category_Products_EagerLoad = ctx.Categories.Include("Products");</b><br /><br />
//VS 
<br /><br /><b>var test = ctx.Categories.Include(c =&gt; c.Products);</b><br /><br /></p>
        <img width="0" height="0" src="http://www.opulentasp.com/aggbug.ashx?id=4b1a38cf-e1ae-4acf-b3db-25498b4fc2a1" />
      </body>
      <title>Extension Methods for stronly typing Eager Loading in Entity Framework</title>
      <guid isPermaLink="false">http://www.opulentasp.com/PermaLink,guid,4b1a38cf-e1ae-4acf-b3db-25498b4fc2a1.aspx</guid>
      <link>http://www.opulentasp.com/2009/05/03/ExtensionMethodsForStronlyTypingEagerLoadingInEntityFramework.aspx</link>
      <pubDate>Sun, 03 May 2009 12:05:06 GMT</pubDate>
      <description>&lt;p&gt;
Yesterday I had the pleasure to present at the Ottawa Code Camp.I showcased something
quite interesting and got alot of feedback on it.&lt;br&gt;
&lt;br&gt;
&lt;img height="160" width="250" src="http://farm4.static.flickr.com/3663/3494469323_7e1747f6e8.jpg?v=0" /&gt; 
&lt;br&gt;
&lt;br&gt;
In Entity Framework you can stronly type your linq to sql includes by adding Extension
Methods. I found just methods as I was perusing the net one day. 
&lt;br&gt;
&lt;br&gt;
&lt;a href="
http://msmvps.com/blogs/matthieu/archive/2008/06/06/entityframework-include-with-func.aspx"&gt;Extension
Method&lt;/a&gt; 
&lt;br&gt;
&lt;br&gt;
Later on I discovered that the possiblitily to daisy chaine these strongly typed incudes
could be done by daisy chaining lambda expressions. .This can be acheived with this
Extension Method from the same author. 
&lt;br&gt;
&lt;br&gt;
&lt;a href="
http://msmvps.com/blogs/matthieu/archive/2008/06/06/entity-framework-include-with-func-next.aspx"&gt;Extension
Method for multiple includes&lt;/a&gt; 
&lt;br&gt;
&lt;br&gt;
The lesson to retain is that the compilation is going to catch the erroneous fields
if they are altered or missing , and not the user at run-time. 
&lt;br&gt;
&lt;br&gt;
Here is the semantical variance: 
&lt;br&gt;
&lt;br&gt;
NORTHWNDEntities ctx = new NORTHWNDEntities(); 
&lt;br&gt;
&lt;br&gt;
&lt;b&gt;var Category_Products_EagerLoad = ctx.Categories.Include("Products");&lt;/b&gt; 
&lt;br&gt;
&lt;br&gt;
//VS 
&lt;br&gt;
&lt;br&gt;
&lt;b&gt;var test = ctx.Categories.Include(c =&gt; c.Products);&lt;/b&gt; 
&lt;br&gt;
&lt;br&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.opulentasp.com/aggbug.ashx?id=4b1a38cf-e1ae-4acf-b3db-25498b4fc2a1" /&gt;</description>
      <comments>http://www.opulentasp.com/CommentView,guid,4b1a38cf-e1ae-4acf-b3db-25498b4fc2a1.aspx</comments>
      <category>Entity Framework</category>
    </item>
  </channel>
</rss>