<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:blogChannel="http://backend.userland.com/blogChannelModule" xmlns:dc="http://purl.org/dc/elements/1.1/" 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:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">
  <channel>
    <title>DevEducate Blog</title>
    <description>Simplifying the Complex</description>
    <link>http://www.deveducate.com/blog/</link>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <generator>BlogEngine.NET 1.6.1.1</generator>
    <language>en-US</language>
    <blogChannel:blogRoll>http://www.deveducate.com/blog/opml.axd</blogChannel:blogRoll>
    <blogChannel:blink>http://www.dotnetblogengine.net/syndication.axd</blogChannel:blink>
    <dc:creator>DevEducate</dc:creator>
    <dc:title>DevEducate Blog</dc:title>
    <geo:lat>0.000000</geo:lat>
    <geo:long>0.000000</geo:long>
    <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/deveducate" /><feedburner:info uri="deveducate" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
      <title>Understanding Azure Events - PowerPoints available</title>
      <description>&lt;p&gt;Between April 11 and April 21, myself and Bruno Terkaly delivered ‘Understanding Azure’ events in 7 cities:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;April 11: Denver&lt;/li&gt;

  &lt;li&gt;April 12: San Francisco&lt;/li&gt;

  &lt;li&gt;April 15: Tempe&lt;/li&gt;

  &lt;li&gt;April 18: Seattle (Bellevue)&lt;/li&gt;

  &lt;li&gt;April 19: Portland&lt;/li&gt;

  &lt;li&gt;April 20: Irvine&lt;/li&gt;

  &lt;li&gt;April 21: Los Angeles&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These were 4 hour events where we covered the gamut of services offered in Azure.&amp;#160; I spent the first 3 hours covering Windows Azure.&amp;#160; I illustrated how to host services in Azure and how to take advantage of Windows Azure Blob, Queue and Table storage, showing both the REST, as well as StorageClient APIs.&amp;#160; Bruno showed off the AppFabric in the last hour.&lt;/p&gt;

&lt;p&gt;My portion of the presentation was a subset of the &lt;a href="http://www.deveducate.com/training/overview/azure-in-a-day"&gt;Azure Training available online on this site&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The powerpoints for the event are available to download here:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href="http://deveducate.blob.core.windows.net/azureeventdownloads/WindowsAzure.pptx"&gt;WindowsAzure.pptx&lt;/a&gt;&lt;/li&gt;

  &lt;li&gt;&lt;a href="http://deveducate.blob.core.windows.net/azureeventdownloads/Blobs.pptx"&gt;Blobs.pptx&lt;/a&gt;&lt;/li&gt;

  &lt;li&gt;&lt;a href="http://deveducate.blob.core.windows.net/azureeventdownloads/AzureTables.pptx"&gt;AzureTables.pptx&lt;/a&gt;&lt;/li&gt;

  &lt;li&gt;&lt;a href="http://deveducate.blob.core.windows.net/azureeventdownloads/Queues.pptx"&gt;Queues.pptx&lt;/a&gt;&lt;/li&gt;

  &lt;li&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;img src="http://feeds.feedburner.com/~r/deveducate/~4/4f-LuClM_UY" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/deveducate/~3/4f-LuClM_UY/post.aspx</link>
      <author>rob@robbagby.com</author>
      <comments>http://www.deveducate.com/blog/post/2011/04/25/Understanding-Azure-Events-PowerPoints-available.aspx#comment</comments>
      <guid isPermaLink="false">http://www.deveducate.com/blog/post.aspx?id=c1145972-c084-46be-a2ad-b34cb28a882c</guid>
      <pubDate>Mon, 25 Apr 2011 22:50:00 -0500</pubDate>
      <dc:publisher>rob@robbagby.com</dc:publisher>
      <pingback:server>http://www.deveducate.com/blog/pingback.axd</pingback:server>
      <pingback:target>http://www.deveducate.com/blog/post.aspx?id=c1145972-c084-46be-a2ad-b34cb28a882c</pingback:target>
      <slash:comments>5</slash:comments>
      <trackback:ping>http://www.deveducate.com/blog/trackback.axd?id=c1145972-c084-46be-a2ad-b34cb28a882c</trackback:ping>
      <wfw:comment>http://www.deveducate.com/blog/post/2011/04/25/Understanding-Azure-Events-PowerPoints-available.aspx#comment</wfw:comment>
      <wfw:commentRss>http://www.deveducate.com/blog/syndication.axd?post=c1145972-c084-46be-a2ad-b34cb28a882c</wfw:commentRss>
    <feedburner:origLink>http://www.deveducate.com/blog/post.aspx?id=c1145972-c084-46be-a2ad-b34cb28a882c</feedburner:origLink></item>
    <item>
      <title>Twas the Release Before Christmas</title>
      <description>&lt;div style="font-style: italic; margin-left: 50px"&gt;
  &lt;p&gt;Twas the release before Christmas 
    &lt;br /&gt;And all through the App 

    &lt;br /&gt;There was random data access code, 

    &lt;br /&gt;It was looking like crap. 

    &lt;br /&gt;&lt;/p&gt;

  &lt;p&gt;Connections were carelessly 
    &lt;br /&gt;Left open everywhere. 

    &lt;br /&gt;Others might think 

    &lt;br /&gt;That I didn’t care. 

    &lt;br /&gt;&lt;/p&gt;

  &lt;p&gt;I needed to put an end 
    &lt;br /&gt;To this custom coding. 

    &lt;br /&gt;I needed to support 

    &lt;br /&gt;Concurrency and Lazy Loading. 

    &lt;br /&gt;&lt;/p&gt;

  &lt;p&gt;I wrote so much SQL 
    &lt;br /&gt;I could hardly think. 

    &lt;br /&gt;God how I wished 

    &lt;br /&gt;My DAL supported LINQ. 

    &lt;br /&gt;&lt;a href="http://www.deveducate.com/blog/post/2010/12/15/Twas-the-Release-Before-Christmas.aspx#continue"&gt;Read More...&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/deveducate/~4/UvZ90M9VKAo" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/deveducate/~3/UvZ90M9VKAo/post.aspx</link>
      <author>rob@robbagby.com</author>
      <comments>http://www.deveducate.com/blog/post/2010/12/15/Twas-the-Release-Before-Christmas.aspx#comment</comments>
      <guid isPermaLink="false">http://www.deveducate.com/blog/post.aspx?id=4c3ee972-9291-4097-828d-2b59d70ceecb</guid>
      <pubDate>Wed, 15 Dec 2010 06:13:00 -0500</pubDate>
      <dc:publisher>rob@robbagby.com</dc:publisher>
      <pingback:server>http://www.deveducate.com/blog/pingback.axd</pingback:server>
      <pingback:target>http://www.deveducate.com/blog/post.aspx?id=4c3ee972-9291-4097-828d-2b59d70ceecb</pingback:target>
      <slash:comments>9</slash:comments>
      <trackback:ping>http://www.deveducate.com/blog/trackback.axd?id=4c3ee972-9291-4097-828d-2b59d70ceecb</trackback:ping>
      <wfw:comment>http://www.deveducate.com/blog/post/2010/12/15/Twas-the-Release-Before-Christmas.aspx#comment</wfw:comment>
      <wfw:commentRss>http://www.deveducate.com/blog/syndication.axd?post=4c3ee972-9291-4097-828d-2b59d70ceecb</wfw:commentRss>
    <feedburner:origLink>http://www.deveducate.com/blog/post.aspx?id=4c3ee972-9291-4097-828d-2b59d70ceecb</feedburner:origLink></item>
    <item>
      <title>Index of Entity Framework Posts and Screencasts</title>
      <description>&lt;p&gt;I am in the process of doing a brief series of blog posts and screencasts on the ADO.NET Entity Framework.&amp;#160; This page will serve as an index.&amp;#160; I will keep it up to date. &lt;/p&gt;

&lt;h3&gt;Blog Posts&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href="http://www.robbagby.com/entity-framework/entity-framework-modeling-table-per-type-inheritance/" target="_blank"&gt;Entity Framework Modeling: Table Per Type Inheritance&lt;/a&gt; &lt;/li&gt;

  &lt;li&gt;&lt;a href="http://www.robbagby.com/entity-framework/entity-framework-modeling-entity-splitting/" target="_blank"&gt;Entity Framework Modeling: Entity Splitting&lt;/a&gt; &lt;/li&gt;

  &lt;li&gt;&lt;a href="http://www.robbagby.com/entity-framework/entity-framework-modeling-entity-splitting-part-ii-adding-inheritance/" target="_blank"&gt;Entity Framework Modeling: Entity Splitting Part II (adding inheritance)&lt;/a&gt; &lt;/li&gt;

  &lt;li&gt;&lt;a href="http://www.robbagby.com/entity-framework/entity-framework-modeling-table-per-hierarchy-inheritance/" target="_blank"&gt;Entity Framework Modeling: Table Per Hierarchy Inheritance&lt;/a&gt; &lt;/li&gt;

  &lt;li&gt;&lt;a href="http://www.robbagby.com/entity-framework/entity-framework-modeling-action-stored-procedures/" target="_blank"&gt;Entity Framework Modeling: Action Stored Procedures&lt;/a&gt; &lt;/li&gt;

  &lt;li&gt;&lt;a href="http://www.robbagby.com/entity-framework/entity-framework-modeling-select-stored-procedures/" target="_blank"&gt;Entity Framework Modeling: Importing Select Stored Procedures&lt;/a&gt; &lt;/li&gt;

  &lt;li&gt;&lt;a href="https://www.deveducate.com/blog/post/2010/12/14/Entity-Framework-Modeling-Table-Splitting.aspx" target="_blank"&gt;Entity Framework Modeling: Table Splitting&lt;/a&gt; &lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;Screencasts&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href="http://channel9.msdn.com/posts/RobBagby/deCast-Entity-Framework-Modeling-Implementing-Table-Per-Type/Default.aspx?wa=wsignin1.0" target="_blank"&gt;deCast - Entity Framework Modeling: Table Per Type Inheritance&lt;/a&gt; &lt;/li&gt;

  &lt;li&gt;&lt;a href="http://channel9.msdn.com/posts/RobBagby/deCast-Entity-Framework-Modeling-Implementing-Entity-Splitting/" target="_blank"&gt;deCast - Entity Framework Modeling: Implementing Entity Splitting&lt;/a&gt; &lt;/li&gt;

  &lt;li&gt;&lt;a href="http://channel9.msdn.com/posts/RobBagby/deCast-Entity-Framework-Modeling-Implementing-Table-Per-Hierarchy/" target="_blank"&gt;deCast - Entity Framework Modeling: Implementing Table Per Hierarchy&lt;/a&gt; &lt;/li&gt;

  &lt;li&gt;&lt;a href="http://channel9.msdn.com/posts/RobBagby/deCast-Entity-Framework-Modeling-Mapping-Action-Stored-Procedures/" target="_blank"&gt;deCast - Entity Framework Modeling: Mapping Action Stored Procedures&lt;/a&gt; &lt;/li&gt;

  &lt;li&gt;&lt;a href="http://channel9.msdn.com/posts/RobBagby/deCast-Entity-Framework-Modeling-Importing-Select-Stored-Procedures/" target="_blank"&gt;deCast - Entity Framework Modeling: Importing Select Stored Procedures&lt;/a&gt; &lt;/li&gt;

  &lt;li&gt;&lt;a href="http://www.youtube.com/watch?v=9kd8WBUMeBI" target="_blank"&gt;Entity Framework Modeling: Table Splitting (YouTube)&lt;/a&gt; &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="http://deveducate.blob.core.windows.net/blogs/EntityFrameworkIndex/LearnEntityFramework%5B4%5D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="LearnEntityFramework" border="0" alt="LearnEntityFramework" src="http://deveducate.blob.core.windows.net/blogs/EntityFrameworkIndex/LearnEntityFramework_thumb%5B2%5D.png" width="550" height="92" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/deveducate/~4/hYhiM0MziMA" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/deveducate/~3/hYhiM0MziMA/post.aspx</link>
      <author>rob@robbagby.com</author>
      <comments>http://www.deveducate.com/blog/post/2010/12/14/Index-of-Entity-Framework-Posts-and-Screencasts.aspx#comment</comments>
      <guid isPermaLink="false">http://www.deveducate.com/blog/post.aspx?id=d21832c6-06f7-4f9b-8e1f-0c82353c2d7f</guid>
      <pubDate>Tue, 14 Dec 2010 07:46:00 -0500</pubDate>
      <dc:publisher>rob@robbagby.com</dc:publisher>
      <pingback:server>http://www.deveducate.com/blog/pingback.axd</pingback:server>
      <pingback:target>http://www.deveducate.com/blog/post.aspx?id=d21832c6-06f7-4f9b-8e1f-0c82353c2d7f</pingback:target>
      <slash:comments>2</slash:comments>
      <trackback:ping>http://www.deveducate.com/blog/trackback.axd?id=d21832c6-06f7-4f9b-8e1f-0c82353c2d7f</trackback:ping>
      <wfw:comment>http://www.deveducate.com/blog/post/2010/12/14/Index-of-Entity-Framework-Posts-and-Screencasts.aspx#comment</wfw:comment>
      <wfw:commentRss>http://www.deveducate.com/blog/syndication.axd?post=d21832c6-06f7-4f9b-8e1f-0c82353c2d7f</wfw:commentRss>
    <feedburner:origLink>http://www.deveducate.com/blog/post.aspx?id=d21832c6-06f7-4f9b-8e1f-0c82353c2d7f</feedburner:origLink></item>
    <item>
      <title>Entity Framework Modeling: Table Splitting</title>
      <description>&lt;p&gt;Table Splitting involves mapping multiple entities in the conceptual layer to a single table in the store.&amp;#160; There are a few scenarios where this is useful.&amp;#160; The most common is that a table may contain a large column that may not be used frequently.&amp;#160; This could be an image, other binary data, xml …&amp;#160; The net-net is that you do not want to always return this beast when fetching an entity.&amp;#160; If / when you want it you can load that relationship using eager, explicit or lazy loading.&amp;#160; &lt;/p&gt;

&lt;p&gt;A second scenario is that you want to split the data among 2 entities for conceptual reasons.&amp;#160; Perhaps you only want certain consumers to have access to certain kinds of data.&amp;#160; In this post, I will illustrate the first scenario, as it is more common.&lt;/p&gt;

&lt;h2&gt;Watch the Screencast&lt;/h2&gt;

&lt;p&gt;&lt;a href="http://www.youtube.com/watch?v=9kd8WBUMeBI" target="_blank"&gt;Entity Framework Modeling: Table Splitting&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;Blog Series Index&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://www.deveducate.com/blog/post/2010/12/14/Index-of-Entity-Framework-Posts-and-Screencasts.aspx"&gt;Index of Entity Framework Posts and Screencasts&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;The Scenario&lt;/h2&gt;

&lt;p&gt;Below you can see the Employees table in Northwind.&amp;#160; As you can see, it has an image column named Photo.&amp;#160; It also has an nvarchar column storing a path to an image (not sure why it has both).&amp;#160; In this demo, I’ll spilt both columns off into a separate entity named EmployeePhoto.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://deveducate.blob.core.windows.net/blogs/TableSplitting/image5.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://deveducate.blob.core.windows.net/blogs/TableSplitting/image_thumb3.png" width="189" height="336" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;Implementing Entity Splitting&lt;/h2&gt;

&lt;h4&gt;Step 1: Create a console application.&amp;#160; I named mine TableSplitting.&lt;/h4&gt;

&lt;h4&gt;Step 2: Add the Entity Data Model.&amp;#160; I named mine NorthwindModel&lt;/h4&gt;

&lt;p&gt;&lt;a href="http://deveducate.blob.core.windows.net/blogs/TableSplitting/SNAGHTML51ead2a7.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="SNAGHTML51ead2a" border="0" alt="SNAGHTML51ead2a" src="http://deveducate.blob.core.windows.net/blogs/TableSplitting/SNAGHTML51ead2a_thumb4.png" width="588" height="331" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Generate the model from the database.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://deveducate.blob.core.windows.net/blogs/TableSplitting/SNAGHTML51fc1466.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="SNAGHTML51fc146" border="0" alt="SNAGHTML51fc146" src="http://deveducate.blob.core.windows.net/blogs/TableSplitting/SNAGHTML51fc146_thumb3.png" width="415" height="422" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Choose the Nortwind connection (or create one, if you need to).&amp;#160; Don’t forget to set an appropriate name to the “entity connection settings”, as this will be the name of your context.&amp;#160; I use the naming convention &amp;lt;Domain&amp;gt;Context, so mine is named NorthwindContext.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://deveducate.blob.core.windows.net/blogs/TableSplitting/SNAGHTML520887b5.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="SNAGHTML520887b" border="0" alt="SNAGHTML520887b" src="http://deveducate.blob.core.windows.net/blogs/TableSplitting/SNAGHTML520887b_thumb2.png" width="414" height="421" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Add the Employees table.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://deveducate.blob.core.windows.net/blogs/TableSplitting/SNAGHTML524e1925.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="SNAGHTML524e192" border="0" alt="SNAGHTML524e192" src="http://deveducate.blob.core.windows.net/blogs/TableSplitting/SNAGHTML524e192_thumb2.png" width="411" height="418" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Your conceptual model will look like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://deveducate.blob.core.windows.net/blogs/TableSplitting/image12.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://deveducate.blob.core.windows.net/blogs/TableSplitting/image_thumb8.png" width="154" height="429" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;Step 3: Copy the Employee entity&lt;/h4&gt;

&lt;p&gt;Simply single-click on the Employee entity and press ctrl+c.&amp;#160; Then click on some whitespace in the model and press ctrl+v.&amp;#160; You should see something like the following:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://deveducate.blob.core.windows.net/blogs/TableSplitting/image17.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://deveducate.blob.core.windows.net/blogs/TableSplitting/image_thumb11.png" width="371" height="441" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;Step 4: Rename the Employee1 Entity and delete the appropriate properties&lt;/h4&gt;

&lt;p&gt;Rename this entity to EmployeePhoto.&amp;#160; Then delete every property from the entity except the following (you can single click or multi-select properties and press the delete key):&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;EmployeeID &lt;/li&gt;

  &lt;li&gt;Photo &lt;/li&gt;

  &lt;li&gt;PhotoPath &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It should now look something like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://deveducate.blob.core.windows.net/blogs/TableSplitting/image53.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://deveducate.blob.core.windows.net/blogs/TableSplitting/image_thumb33.png" width="369" height="443" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;Step 5: Delete the Photo and PhotoPath properties from the Employee Entity&lt;/h4&gt;

&lt;p&gt;Select the Photo and PhotoPath properties from the Employee entity and press the delete key.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://deveducate.blob.core.windows.net/blogs/TableSplitting/image58.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://deveducate.blob.core.windows.net/blogs/TableSplitting/image_thumb36.png" width="366" height="410" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;Step 6: Map the EmployeePhoto entity to the Employees Table&lt;/h4&gt;

&lt;p&gt;Right-click the EmployeePhoto entity and choose “Table Mapping”&lt;/p&gt;

&lt;p&gt;&lt;a href="http://deveducate.blob.core.windows.net/blogs/TableSplitting/image63.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://deveducate.blob.core.windows.net/blogs/TableSplitting/image_thumb39.png" width="364" height="308" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Choose to map this entity to the Employees table.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://deveducate.blob.core.windows.net/blogs/TableSplitting/image38.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://deveducate.blob.core.windows.net/blogs/TableSplitting/image_thumb24.png" width="469" height="137" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Because the property names line up with the table column names, you do not need to do anything else.&amp;#160; Notice that the EmployeeID, Photo and PhotoPath properties are mapped to the appropriate table columns:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://deveducate.blob.core.windows.net/blogs/TableSplitting/image68.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://deveducate.blob.core.windows.net/blogs/TableSplitting/image_thumb42.png" width="461" height="388" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;Step 7: Add a 1:1 Association between the Employee and EmployeePhoto entities&lt;/h4&gt;

&lt;p&gt;Right-click the EmployeePhoto entity, choose “Add” and choose “Association…”&lt;/p&gt;

&lt;p&gt;&lt;a href="http://deveducate.blob.core.windows.net/blogs/TableSplitting/image73.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://deveducate.blob.core.windows.net/blogs/TableSplitting/image_thumb45.png" width="458" height="275" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Make sure the multiplicity between the 2 entities is 1:1 like below:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://deveducate.blob.core.windows.net/blogs/TableSplitting/SNAGHTML53cb1fb6.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="SNAGHTML53cb1fb" border="0" alt="SNAGHTML53cb1fb" src="http://deveducate.blob.core.windows.net/blogs/TableSplitting/SNAGHTML53cb1fb_thumb3.png" width="380" height="490" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;Step 8: Add a referential constraint between the Employee and EmployeePhoto entities&lt;/h4&gt;

&lt;p&gt;Double-Click the association line to bring up the referential constraint dialog.&amp;#160; Choose the Employee as the principle and press OK.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://deveducate.blob.core.windows.net/blogs/TableSplitting/image85.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://deveducate.blob.core.windows.net/blogs/TableSplitting/image_thumb53.png" width="494" height="319" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This created a referential constraint in the conceptual layer.&amp;#160; You can look at it by saving the model, closing the designer and opening the edmx with an XML Editor.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://deveducate.blob.core.windows.net/blogs/TableSplitting/image90.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://deveducate.blob.core.windows.net/blogs/TableSplitting/image_thumb56.png" width="489" height="324" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Scroll down to the Association Element in the &lt;strong&gt;CSDL&lt;/strong&gt; and you can see the referential constraint.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://deveducate.blob.core.windows.net/blogs/TableSplitting/image100.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://deveducate.blob.core.windows.net/blogs/TableSplitting/image_thumb62.png" width="488" height="167" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;Testing the Model&lt;/h2&gt;

&lt;p&gt;Write the following code in your SVM:&lt;/p&gt;

&lt;p style="padding-bottom: 0px; line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;font face="Consolas"&gt;&lt;span style="font-family: "&gt;&lt;font color="#0000ff"&gt;&lt;font style="font-size: 9pt"&gt;static&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="font-family: "&gt;&lt;font style="font-size: 9pt"&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;void&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; Main(&lt;/font&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;string&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;[] args)&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p style="padding-bottom: 0px; line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="font-family: "&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt;{&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p style="padding-bottom: 0px; line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;font face="Consolas"&gt;&lt;span style="font-family: "&gt;&lt;font color="#000000"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;span style="font-family: "&gt;&lt;font color="#0000ff"&gt;&lt;font style="font-size: 9pt"&gt;using&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="font-family: "&gt;&lt;font style="font-size: 9pt"&gt;&lt;font color="#000000"&gt; (&lt;/font&gt;&lt;span&gt;&lt;font color="#2b91af"&gt;NorthwindContext&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; context = &lt;/font&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;new&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;span&gt;&lt;font color="#2b91af"&gt;NorthwindContext&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;())&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p style="padding-bottom: 0px; line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;font color="#000000" face="Consolas"&gt;&lt;span style="font-family: "&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/font&gt;&lt;span style="font-family: "&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt;{&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p style="padding-bottom: 0px; line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;font face="Consolas"&gt;&lt;span style="font-family: "&gt;&lt;font color="#000000"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;span style="font-family: "&gt;&lt;font color="#0000ff"&gt;&lt;font style="font-size: 9pt"&gt;var&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="font-family: "&gt;&lt;font style="font-size: 9pt"&gt;&lt;font color="#000000"&gt; employee = (&lt;/font&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;from&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; e &lt;/font&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;in&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; context.Employees&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p style="padding-bottom: 0px; line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;font color="#000000" face="Consolas"&gt;&lt;span style="font-family: "&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/font&gt;&lt;span style="font-family: "&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size: 9pt"&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;select&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; e).FirstOrDefault();&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p style="padding-bottom: 0px; line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="font-family: "&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p style="padding-bottom: 0px; line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;font face="Consolas"&gt;&lt;span style="font-family: "&gt;&lt;font color="#000000"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;span style="font-family: "&gt;&lt;font color="#2b91af"&gt;&lt;font style="font-size: 9pt"&gt;Console&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="font-family: "&gt;&lt;font style="font-size: 9pt" color="#000000"&gt;.WriteLine(employee.LastName);&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p style="padding-bottom: 0px; line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;font color="#000000" face="Consolas"&gt;&lt;span style="font-family: "&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/font&gt;&lt;font face="Consolas"&gt;&lt;span style="font-family: "&gt;&lt;font color="#2b91af"&gt;&lt;font style="font-size: 9pt"&gt;Console&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="font-family: "&gt;&lt;font style="font-size: 9pt" color="#000000"&gt;.WriteLine(employee.EmployeePhoto.Photo.Length.ToString());&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p style="padding-bottom: 0px; line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;font color="#000000" face="Consolas"&gt;&lt;span style="font-family: "&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/font&gt;&lt;span style="font-family: "&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt;}&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p style="padding-bottom: 0px; line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="font-family: "&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p style="padding-bottom: 0px; line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;font face="Consolas"&gt;&lt;span style="font-family: "&gt;&lt;font color="#000000"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;span style="font-family: "&gt;&lt;font color="#2b91af"&gt;&lt;font style="font-size: 9pt"&gt;Console&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="font-family: "&gt;&lt;font style="font-size: 9pt" color="#000000"&gt;.ReadLine();&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p style="padding-bottom: 0px; line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="font-family: "&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt;}&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;If you run it, you get the expected result:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://deveducate.blob.core.windows.net/blogs/TableSplitting/image104.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://deveducate.blob.core.windows.net/blogs/TableSplitting/image_thumb64.png" width="240" height="113" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Taking a look at SQL Profiler, you can see that the original query did not return the Photo or PhotoPath columns.&amp;#160; &lt;/p&gt;

&lt;p&gt;&lt;a href="http://deveducate.blob.core.windows.net/blogs/TableSplitting/image110.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://deveducate.blob.core.windows.net/blogs/TableSplitting/image_thumb68.png" width="470" height="388" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can also see that, when we accessed the EmployeePhoto entity, Lazy Loading kicked in and a query was sent to the server to fetch the Photo and PhotoPath columns.&amp;#160; Have a look:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://deveducate.blob.core.windows.net/blogs/TableSplitting/image115.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://deveducate.blob.core.windows.net/blogs/TableSplitting/image_thumb71.png" width="469" height="215" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;Using Eager Loading&lt;/h2&gt;

&lt;p&gt;We didn’t have to use Lazy Loading to fetch the related EmployeePhoto entity.&amp;#160; If I knew that I needed to access the EmployeePhoto with the Employee, I could simply use Eager Loading.&amp;#160; have a look at the following code.&amp;#160; The only difference is that I added an “Include” statement.&lt;/p&gt;

&lt;p style="padding-bottom: 0px; line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;font face="Consolas"&gt;&lt;span style="font-family: "&gt;&lt;font color="#0000ff"&gt;&lt;font style="font-size: 9pt"&gt;using&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="font-family: "&gt;&lt;font style="font-size: 9pt"&gt;&lt;font color="#000000"&gt; (&lt;/font&gt;&lt;span&gt;&lt;font color="#2b91af"&gt;NorthwindContext&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; context = &lt;/font&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;new&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;span&gt;&lt;font color="#2b91af"&gt;NorthwindContext&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;())&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p style="padding-bottom: 0px; line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="font-family: "&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt;{&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p style="padding-bottom: 0px; line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="font-family: "&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;var&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; employee = (&lt;/font&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;from&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; e &lt;/font&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;in&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; context.Employees.Include(&lt;/font&gt;&lt;span&gt;&lt;font color="#a31515"&gt;&amp;quot;EmployeePhoto&amp;quot;&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;)&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p style="padding-bottom: 0px; line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="font-family: "&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;select&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; e).FirstOrDefault();&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p style="padding-bottom: 0px; line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="font-family: "&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p style="padding-bottom: 0px; line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="font-family: "&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span&gt;&lt;font color="#2b91af"&gt;Console&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;.WriteLine(employee.LastName);&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p style="padding-bottom: 0px; line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="font-family: "&gt;&lt;font face="Consolas"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size: 9pt"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9pt"&gt;&lt;span&gt;&lt;font color="#2b91af"&gt;Console&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;.WriteLine(employee.EmployeePhoto.Photo.Length.ToString());&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p style="padding-bottom: 0px; line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="font-family: "&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt;}&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p style="padding-bottom: 0px; line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;span style="font-family: "&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size: 9pt" color="#000000"&gt;&amp;#160;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p style="padding-bottom: 0px; line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;font face="Consolas"&gt;&lt;span style="font-family: "&gt;&lt;font color="#2b91af"&gt;&lt;font style="font-size: 9pt"&gt;Console&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="font-family: "&gt;&lt;font style="font-size: 9pt" color="#000000"&gt;.ReadLine();&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p&gt;If I clear profiler and run the code again, notice that only one query is now run and that the Photo and PhotoPath columns are returned.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://deveducate.blob.core.windows.net/blogs/TableSplitting/image121.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://deveducate.blob.core.windows.net/blogs/TableSplitting/image_thumb75.png" width="482" height="408" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;Conclusion&lt;/h2&gt;

&lt;p&gt;The tooling in Entity Framework 4 makes short work of Table Splitting.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/deveducate/~4/oD0NX1dtobM" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/deveducate/~3/oD0NX1dtobM/post.aspx</link>
      <author>rob@robbagby.com</author>
      <comments>http://www.deveducate.com/blog/post/2010/12/14/Entity-Framework-Modeling-Table-Splitting.aspx#comment</comments>
      <guid isPermaLink="false">http://www.deveducate.com/blog/post.aspx?id=d7cfbdbe-f3cf-4380-bc35-88063af99cb2</guid>
      <pubDate>Tue, 14 Dec 2010 07:37:00 -0500</pubDate>
      <dc:publisher>rob@robbagby.com</dc:publisher>
      <pingback:server>http://www.deveducate.com/blog/pingback.axd</pingback:server>
      <pingback:target>http://www.deveducate.com/blog/post.aspx?id=d7cfbdbe-f3cf-4380-bc35-88063af99cb2</pingback:target>
      <slash:comments>15</slash:comments>
      <trackback:ping>http://www.deveducate.com/blog/trackback.axd?id=d7cfbdbe-f3cf-4380-bc35-88063af99cb2</trackback:ping>
      <wfw:comment>http://www.deveducate.com/blog/post/2010/12/14/Entity-Framework-Modeling-Table-Splitting.aspx#comment</wfw:comment>
      <wfw:commentRss>http://www.deveducate.com/blog/syndication.axd?post=d7cfbdbe-f3cf-4380-bc35-88063af99cb2</wfw:commentRss>
    <feedburner:origLink>http://www.deveducate.com/blog/post.aspx?id=d7cfbdbe-f3cf-4380-bc35-88063af99cb2</feedburner:origLink></item>
    <item>
      <title>Partial Classes Naming Convention in the Entity Framework</title>
      <description>&lt;p&gt;You are likely aware that the classes generated by the T4 templates provided by the Entity Framework (EntityObject, POCO, Self-tracking entities) are implemented as partial classes.&amp;#160; This allows you to implement your custom business logic in another (or multiple) partial class(es) and your code will not be overwritten if/when you make changes to your model.&amp;#160; It is a nice pre-compile feature that allows you to split your class across multiple files.&lt;/p&gt;

&lt;p&gt;The question comes up though, how to name these partials.&amp;#160; &lt;a href="http://www.deveducate.com/blog/post/2010/11/30/Partial-Classes-Naming-Convention-in-the-Entity-Framework.aspx#continue"&gt;Read More...&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/deveducate/~4/rbNJ84mxL0I" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/deveducate/~3/rbNJ84mxL0I/post.aspx</link>
      <author>rob.bagby@deveducate.com</author>
      <comments>http://www.deveducate.com/blog/post/2010/11/30/Partial-Classes-Naming-Convention-in-the-Entity-Framework.aspx#comment</comments>
      <guid isPermaLink="false">http://www.deveducate.com/blog/post.aspx?id=d8ab4a2e-dc6f-41db-841f-e9161030b37a</guid>
      <pubDate>Tue, 30 Nov 2010 15:00:00 -0500</pubDate>
      <dc:publisher>rob.bagby@deveducate.com</dc:publisher>
      <pingback:server>http://www.deveducate.com/blog/pingback.axd</pingback:server>
      <pingback:target>http://www.deveducate.com/blog/post.aspx?id=d8ab4a2e-dc6f-41db-841f-e9161030b37a</pingback:target>
      <slash:comments>11</slash:comments>
      <trackback:ping>http://www.deveducate.com/blog/trackback.axd?id=d8ab4a2e-dc6f-41db-841f-e9161030b37a</trackback:ping>
      <wfw:comment>http://www.deveducate.com/blog/post/2010/11/30/Partial-Classes-Naming-Convention-in-the-Entity-Framework.aspx#comment</wfw:comment>
      <wfw:commentRss>http://www.deveducate.com/blog/syndication.axd?post=d8ab4a2e-dc6f-41db-841f-e9161030b37a</wfw:commentRss>
    <feedburner:origLink>http://www.deveducate.com/blog/post.aspx?id=d8ab4a2e-dc6f-41db-841f-e9161030b37a</feedburner:origLink></item>
    <item>
      <title>Azure Blob URIs are case sensitive–just ask your shrink</title>
      <description>&lt;p&gt;If you have worked with Azure Blobs before, you have undoubtedly run into this.&amp;#160; If you are like me, you spent 30 minutes or so trying to access a blob and getting a big fat 404.&amp;#160; You probably initially assumed that it was a permissions issue (it almost always is), only to find out that blob URIs are case sensitive.&amp;#160; &lt;/p&gt;

&lt;p&gt;Did that / should that piss you off?&amp;#160; To answer that question, I’m going to give you a rare glimpse into my world.&amp;#160; The following is an excerpt from a therapy session between myself and my shrink. &lt;a href="http://www.deveducate.com/blog/post/2010/11/23/Azure-Blob-URIs-are-case-sensitivee28093just-ask-your-shrink.aspx#continue"&gt;Read More...&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/deveducate/~4/2fL76jq2LSs" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/deveducate/~3/2fL76jq2LSs/post.aspx</link>
      <author>rob@robbagby.com</author>
      <comments>http://www.deveducate.com/blog/post/2010/11/23/Azure-Blob-URIs-are-case-sensitivee28093just-ask-your-shrink.aspx#comment</comments>
      <guid isPermaLink="false">http://www.deveducate.com/blog/post.aspx?id=3e131ab1-27c7-4a93-88b4-7e21d5f052b2</guid>
      <pubDate>Tue, 23 Nov 2010 15:34:00 -0500</pubDate>
      <dc:publisher>rob@robbagby.com</dc:publisher>
      <pingback:server>http://www.deveducate.com/blog/pingback.axd</pingback:server>
      <pingback:target>http://www.deveducate.com/blog/post.aspx?id=3e131ab1-27c7-4a93-88b4-7e21d5f052b2</pingback:target>
      <slash:comments>7</slash:comments>
      <trackback:ping>http://www.deveducate.com/blog/trackback.axd?id=3e131ab1-27c7-4a93-88b4-7e21d5f052b2</trackback:ping>
      <wfw:comment>http://www.deveducate.com/blog/post/2010/11/23/Azure-Blob-URIs-are-case-sensitivee28093just-ask-your-shrink.aspx#comment</wfw:comment>
      <wfw:commentRss>http://www.deveducate.com/blog/syndication.axd?post=3e131ab1-27c7-4a93-88b4-7e21d5f052b2</wfw:commentRss>
    <feedburner:origLink>http://www.deveducate.com/blog/post.aspx?id=3e131ab1-27c7-4a93-88b4-7e21d5f052b2</feedburner:origLink></item>
    <item>
      <title>Implementing Lazy Loading For My POCO in Entity Framework 4</title>
      <description>&lt;p&gt;&lt;a href="https://www.deveducate.com/blog/post/2010/11/09/POCOs-in-Entity-Framework-4-Overview.aspx" target="_blank"&gt;In a previous post&lt;/a&gt;, I provided a simple end-to-end example where I used the Entity Framework designer to generate an Entity Data Model (EDM), I turned off the default code generation and implemented my own POCOs.&amp;#160; Everything worked fine, but at the end of the post I pointed out that I no longer had the Lazy Loading capability I had with the designer generated objects (a.k.a EntityObjects)..&lt;/p&gt;


&lt;h2&gt;Get the Sample Code&lt;/h2&gt;

&lt;p&gt;&amp;#160;&lt;a href="http://www.deveducate.com/downloads" target="_blank"&gt;You can download the sample code here.&lt;/a&gt;&lt;/p&gt;


&lt;h2&gt;Lazy Loading for POCOs&lt;/h2&gt;

&lt;p&gt;At this point, I have a few POCOs which, by their nature, are very simple classes, as well as my context object.&amp;#160; See the Customer class below: &lt;a href="http://www.deveducate.com/blog/post/2010/11/17/Implementing-Lazy-Loading-For-My-POCO-in-Entity-Framework-4.aspx#continue"&gt;Read More...&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/deveducate/~4/vr_6TIIRkGM" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/deveducate/~3/vr_6TIIRkGM/post.aspx</link>
      <author>rob@robbagby.com</author>
      <comments>http://www.deveducate.com/blog/post/2010/11/17/Implementing-Lazy-Loading-For-My-POCO-in-Entity-Framework-4.aspx#comment</comments>
      <guid isPermaLink="false">http://www.deveducate.com/blog/post.aspx?id=30cf84ea-ae3c-4f4c-a977-d4c7b0861f9d</guid>
      <pubDate>Wed, 17 Nov 2010 11:41:00 -0500</pubDate>
      <dc:publisher>rob@robbagby.com</dc:publisher>
      <pingback:server>http://www.deveducate.com/blog/pingback.axd</pingback:server>
      <pingback:target>http://www.deveducate.com/blog/post.aspx?id=30cf84ea-ae3c-4f4c-a977-d4c7b0861f9d</pingback:target>
      <slash:comments>4</slash:comments>
      <trackback:ping>http://www.deveducate.com/blog/trackback.axd?id=30cf84ea-ae3c-4f4c-a977-d4c7b0861f9d</trackback:ping>
      <wfw:comment>http://www.deveducate.com/blog/post/2010/11/17/Implementing-Lazy-Loading-For-My-POCO-in-Entity-Framework-4.aspx#comment</wfw:comment>
      <wfw:commentRss>http://www.deveducate.com/blog/syndication.axd?post=30cf84ea-ae3c-4f4c-a977-d4c7b0861f9d</wfw:commentRss>
    <feedburner:origLink>http://www.deveducate.com/blog/post.aspx?id=30cf84ea-ae3c-4f4c-a977-d4c7b0861f9d</feedburner:origLink></item>
    <item>
      <title>Is Lazy Loading in EF 4 Evil or the Second Coming?</title>
      <description>&lt;p&gt;(As you probably know) The Entity Framework provides you with various options for loading related entities.&amp;#160; In Entity Framework 4, you have the choice to implement eager loading, explicit loading and now… lazy loading.&amp;#160; Lazy loading was &lt;strong&gt;not&lt;/strong&gt; available in version 1.&amp;#160; A quick search on ‘Lazy Loading’ will yield opinions from 2 very different camps.&amp;#160; Some folks see lazy loading as a necessity for an ORM, while others believe it to be evil.&amp;#160; So, who is right?&amp;#160; This post will examine that question.&amp;#160; If you are not familiar with what all of the load options are, I will start the post with a brief description of each.&lt;/p&gt;

&lt;h2&gt;The Code Scenario&lt;/h2&gt;

&lt;p&gt;We will use the following simple scenario to examine the various load options.&amp;#160; In this scenario, we have 2 entities that we are surfacing as objects: Customer and Order.&amp;#160; Each customer has 0 to many orders.&amp;#160; Imagine the following code accessing the customer and it’s orders (in this case in a console application):&lt;/p&gt;

&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;using &lt;/span&gt;(&lt;span style="color: #2b91af"&gt;NorthwindContext &lt;/span&gt;nw = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;NorthwindContext&lt;/span&gt;())
{
    &lt;span style="color: blue"&gt;var &lt;/span&gt;query = &lt;span style="color: blue"&gt;from &lt;/span&gt;c &lt;span style="color: blue"&gt;in &lt;/span&gt;nw.Customers
                &lt;span style="color: blue"&gt;where &lt;/span&gt;c.CompanyName.StartsWith(&lt;span style="color: #a31515"&gt;&amp;quot;A&amp;quot;&lt;/span&gt;)
                &lt;span style="color: blue"&gt;select &lt;/span&gt;c;

    &lt;span style="color: blue"&gt;foreach &lt;/span&gt;(&lt;span style="color: #2b91af"&gt;Customer &lt;/span&gt;c &lt;span style="color: blue"&gt;in &lt;/span&gt;query)
    {
        &lt;span style="color: #2b91af"&gt;Console&lt;/span&gt;.WriteLine(&lt;span style="color: #a31515"&gt;&amp;quot;{0}&amp;quot;&lt;/span&gt;, c.CompanyName);

        &lt;span style="color: blue"&gt;foreach &lt;/span&gt;(&lt;span style="color: #2b91af"&gt;Order &lt;/span&gt;order &lt;span style="color: blue"&gt;in &lt;/span&gt;c.Orders)
        {
            &lt;span style="color: #2b91af"&gt;Console&lt;/span&gt;.WriteLine(&lt;span style="color: #a31515"&gt;&amp;quot;\t{0}&amp;quot;&lt;/span&gt;, order.OrderDate.ToString());
        }
    }

    &lt;span style="color: #2b91af"&gt;Console&lt;/span&gt;.ReadLine();
}&lt;/pre&gt;

&lt;p&gt;For the sake of this example, assume that we have 3 customers, with a total of 24 orders between them. &lt;a href="http://www.deveducate.com/blog/post/2010/11/11/Is-Lazy-Loading-in-EF-4-Evil-or-the-Second-Coming.aspx#continue"&gt;Read More...&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/deveducate/~4/Ly5n4F6w2kE" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/deveducate/~3/Ly5n4F6w2kE/post.aspx</link>
      <author>rob@robbagby.com</author>
      <comments>http://www.deveducate.com/blog/post/2010/11/11/Is-Lazy-Loading-in-EF-4-Evil-or-the-Second-Coming.aspx#comment</comments>
      <guid isPermaLink="false">http://www.deveducate.com/blog/post.aspx?id=e9d067fd-4830-464f-ab5a-4eb5c44c3979</guid>
      <pubDate>Thu, 11 Nov 2010 05:06:00 -0500</pubDate>
      <dc:publisher>rob@robbagby.com</dc:publisher>
      <pingback:server>http://www.deveducate.com/blog/pingback.axd</pingback:server>
      <pingback:target>http://www.deveducate.com/blog/post.aspx?id=e9d067fd-4830-464f-ab5a-4eb5c44c3979</pingback:target>
      <slash:comments>15</slash:comments>
      <trackback:ping>http://www.deveducate.com/blog/trackback.axd?id=e9d067fd-4830-464f-ab5a-4eb5c44c3979</trackback:ping>
      <wfw:comment>http://www.deveducate.com/blog/post/2010/11/11/Is-Lazy-Loading-in-EF-4-Evil-or-the-Second-Coming.aspx#comment</wfw:comment>
      <wfw:commentRss>http://www.deveducate.com/blog/syndication.axd?post=e9d067fd-4830-464f-ab5a-4eb5c44c3979</wfw:commentRss>
    <feedburner:origLink>http://www.deveducate.com/blog/post.aspx?id=e9d067fd-4830-464f-ab5a-4eb5c44c3979</feedburner:origLink></item>
    <item>
      <title>POCOs in Entity Framework 4 - Overview</title>
      <description>&lt;p&gt;Entity Framework 4 provides a ton of support for working with POCOs.&amp;#160; To start with, there is T4 Template support to automatically generate POCO classes (along with a context object).&amp;#160; There is also support for implementing higher-order functionality in your POCOs (change tracking, lazy loading, relationship fix-up) without compromising the POCOness of your objects.&amp;#160; This is done through proxy objects.&lt;/p&gt;

&lt;p&gt;I thought I might examine the topic of POCOs in Entity Framework 4 in detail over a few posts.&amp;#160; In this post, I’ll illustrate high-level POCO support in EF4 without taking advantage of any templates.&amp;#160; In future posts, I’ll look at the templates, POCOs with proxies, as well as how you might support (or pesudo-support) some of those higher-level features without Proxies.&lt;/p&gt;

&lt;h2&gt;What are POCOs?&lt;/h2&gt;

&lt;p&gt;If you’re reading this, you probably already know that POCO refers to “Plain Old CLR Objects”.&amp;#160; These are simple objects that are free of any framework dependencies.&amp;#160; POCO objects do not have to inherit from specific classes, do not have to implement specific interfaces, nor do they require any specific attributes.&amp;#160; They are simple, lightweight objects that are used to pass data around. &lt;a href="http://www.deveducate.com/blog/post/2010/11/09/POCOs-in-Entity-Framework-4-Overview.aspx#continue"&gt;Read More...&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/deveducate/~4/S_aLgZ1lyGc" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/deveducate/~3/S_aLgZ1lyGc/post.aspx</link>
      <author>rob@deveducate.com</author>
      <comments>http://www.deveducate.com/blog/post/2010/11/09/POCOs-in-Entity-Framework-4-Overview.aspx#comment</comments>
      <guid isPermaLink="false">http://www.deveducate.com/blog/post.aspx?id=93f8d99f-9421-4046-b197-9b538458bd88</guid>
      <pubDate>Tue, 09 Nov 2010 13:37:00 -0500</pubDate>
      <dc:publisher>rob@deveducate.com</dc:publisher>
      <pingback:server>http://www.deveducate.com/blog/pingback.axd</pingback:server>
      <pingback:target>http://www.deveducate.com/blog/post.aspx?id=93f8d99f-9421-4046-b197-9b538458bd88</pingback:target>
      <slash:comments>16</slash:comments>
      <trackback:ping>http://www.deveducate.com/blog/trackback.axd?id=93f8d99f-9421-4046-b197-9b538458bd88</trackback:ping>
      <wfw:comment>http://www.deveducate.com/blog/post/2010/11/09/POCOs-in-Entity-Framework-4-Overview.aspx#comment</wfw:comment>
      <wfw:commentRss>http://www.deveducate.com/blog/syndication.axd?post=93f8d99f-9421-4046-b197-9b538458bd88</wfw:commentRss>
    <feedburner:origLink>http://www.deveducate.com/blog/post.aspx?id=93f8d99f-9421-4046-b197-9b538458bd88</feedburner:origLink></item>
  </channel>
</rss>

