<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule"
>

<channel>
	<title>From the Desk of Brandon Haynes &#187; Entity Framework (EF)</title>
	<atom:link href="http://blogs.law.harvard.edu/brandonhaynes/category/technology/entity-framework-ef/feed/" rel="self" type="application/rss+xml" />
	<link>http://blogs.law.harvard.edu/brandonhaynes</link>
	<description>Observations about the intersection of technology, business, and intellectual property</description>
	<lastBuildDate>Wed, 21 Oct 2009 16:14:28 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<creativeCommons:license>http://creativecommons.org/licenses/by-sa/3.0/us/</creativeCommons:license>
		<item>
		<title>Released: DotNetNuke Entity Framework Model Adapter</title>
		<link>http://blogs.law.harvard.edu/brandonhaynes/2009/09/08/dotnetnuke-entity-framework-model-adapter/</link>
		<comments>http://blogs.law.harvard.edu/brandonhaynes/2009/09/08/dotnetnuke-entity-framework-model-adapter/#comments</comments>
		<pubDate>Tue, 08 Sep 2009 13:00:10 +0000</pubDate>
		<dc:creator>Brandon Haynes</dc:creator>
				<category><![CDATA[DotNetNuke (DNN) Content Management System]]></category>
		<category><![CDATA[Entity Framework (EF)]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[DotNetNuke]]></category>
		<category><![CDATA[DotNetNuke Integration]]></category>
		<category><![CDATA[Entity Framework]]></category>

		<guid isPermaLink="false">http://blogs.law.harvard.edu/brandonhaynes/?p=296</guid>
		<description><![CDATA[The Entity Framework ObjectContext allows for development using a model automatically generated by a Visual Studio designer. However, when deployed within DotNetNuke, these attributes do not pick up the database owner and object qualifier required for correct inter-operation.  Because of this, large-scale deployment of modules using the Entity Framework is infeasible, and modules using the [...]]]></description>
			<content:encoded><![CDATA[<p>The Entity Framework <a href="http://msdn.microsoft.com/en-us/library/system.data.objects.objectcontext.aspx">ObjectContext</a> allows for development using a model automatically generated by a Visual Studio designer. However, when deployed within <a href="http://www.dotnetnuke.com">DotNetNuke</a>, these attributes do not pick up the database owner and object qualifier required for correct inter-operation.  Because of this, large-scale deployment of modules using the Entity Framework is infeasible, and modules using the technology are unfortunately limited to internal applications.</p>
<p>To remedy this issue, I have developed an adapter that converts the Entity Framework model generated by the designer into a DotNetNuke-compatible model that uses both the object qualifier and database owner specified by an end-installation.  This adapter is based off of the more <a href="http://efmodeladapter.codeplex.com/">generalized model adaptation framework</a> that I recently released.</p>
<p>My goals for any satisfactory solution were as follows:</p>
<div>
<ul>
<li>Run-time adjustment of an Entity Framework EDMX model to conform to any given DotNetNuke installation, including:
<ul>
<li>Connection-based adaptation (e.g. use of a runtime-specified connection string)</li>
</ul>
</li>
<li>Run-time adjustment of model schema to effectuate:
<ul>
<li>Adjusting data-level table and stored procedure prefixes to match the DotNetNuke installation ObjectQualifier</li>
<li>Adjusting the owner of database objects to match the DotNetNuke installation DatabaseOwner</li>
</ul>
</li>
<li>Continued use of the Visual Studio Model designer</li>
<li>No tedious changes in the compiler-generated code</li>
<li>Continued use of an assembly-embedded EDMX model (and thereby no additional or external schema deployment files)</li>
</ul>
</div>
<p>This solution extends the <a class="externalLink" href="http://efmodeladapter.codeplex.com/">Entity Framework runtime model adapter</a> to operate within a DotNetNuke extension, allowing a developer to design against an unqualified, dbo-owned DotNetNuke instance and be assured that it will deploy (and operate) correctly on any configuration that an end user might have deployed. Adaptation is largely inexpensive, and since the models are cached by type, performance is not significantly affected.</p>
<p><a href="http://dnnentityframework.codeplex.com/">Click here</a> to access the project site for additional <a href="http://dnnentityframework.codeplex.com/">details</a> and <a href="http://dnnentityframework.codeplex.com/Release/ProjectReleases.aspx">downloads</a>.  Though the content herein is protected under the license below, be sure to consult the project license (New BSD) for integration-related details.</p>
<p>As always, feedback is greatly appreciated.</p>
<p>B</p>



Share on:


	<a rel="nofollow" id="digg" href="javascript:window.location='http%3A%2F%2Fdigg.com%2Fsubmit%3Fphase%3D2%26amp%3Burl%3Dhttp%253A%252F%252Fblogs.law.harvard.edu%252Fbrandonhaynes%252F2009%252F09%252F08%252Fdotnetnuke-entity-framework-model-adapter%252F%26amp%3Btitle%3DReleased%253A%2520DotNetNuke%2520Entity%2520Framework%2520Model%2520Adapter%26amp%3Bbodytext%3DThe%2520Entity%2520Framework%2520ObjectContext%2520allows%2520for%2520development%2520using%2520a%2520model%2520automatically%2520generated%2520by%2520a%2520Visual%2520Studio%2520designer.%2520However%252C%2520when%2520deployed%2520within%2520DotNetNuke%252C%2520these%2520attributes%2520do%2520not%2520pick%2520up%2520the%2520database%2520owner%2520and%2520object%2520qualifier%2520required%2520fo';" title="Digg"><img src="http://blogs.law.harvard.edu/brandonhaynes/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow" id="del.icio.us" href="javascript:window.location='http%3A%2F%2Fdelicious.com%2Fpost%3Furl%3Dhttp%253A%252F%252Fblogs.law.harvard.edu%252Fbrandonhaynes%252F2009%252F09%252F08%252Fdotnetnuke-entity-framework-model-adapter%252F%26amp%3Btitle%3DReleased%253A%2520DotNetNuke%2520Entity%2520Framework%2520Model%2520Adapter%26amp%3Bnotes%3DThe%2520Entity%2520Framework%2520ObjectContext%2520allows%2520for%2520development%2520using%2520a%2520model%2520automatically%2520generated%2520by%2520a%2520Visual%2520Studio%2520designer.%2520However%252C%2520when%2520deployed%2520within%2520DotNetNuke%252C%2520these%2520attributes%2520do%2520not%2520pick%2520up%2520the%2520database%2520owner%2520and%2520object%2520qualifier%2520required%2520fo';" title="del.icio.us"><img src="http://blogs.law.harvard.edu/brandonhaynes/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow" id="facebook" href="javascript:window.location='http%3A%2F%2Fwww.facebook.com%2Fshare.php%3Fu%3Dhttp%253A%252F%252Fblogs.law.harvard.edu%252Fbrandonhaynes%252F2009%252F09%252F08%252Fdotnetnuke-entity-framework-model-adapter%252F%26amp%3Bt%3DReleased%253A%2520DotNetNuke%2520Entity%2520Framework%2520Model%2520Adapter';" title="Facebook"><img src="http://blogs.law.harvard.edu/brandonhaynes/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow" id="google" href="javascript:window.location='http%3A%2F%2Fwww.google.com%2Fbookmarks%2Fmark%3Fop%3Dedit%26amp%3Bbkmk%3Dhttp%253A%252F%252Fblogs.law.harvard.edu%252Fbrandonhaynes%252F2009%252F09%252F08%252Fdotnetnuke-entity-framework-model-adapter%252F%26amp%3Btitle%3DReleased%253A%2520DotNetNuke%2520Entity%2520Framework%2520Model%2520Adapter%26amp%3Bannotation%3DThe%2520Entity%2520Framework%2520ObjectContext%2520allows%2520for%2520development%2520using%2520a%2520model%2520automatically%2520generated%2520by%2520a%2520Visual%2520Studio%2520designer.%2520However%252C%2520when%2520deployed%2520within%2520DotNetNuke%252C%2520these%2520attributes%2520do%2520not%2520pick%2520up%2520the%2520database%2520owner%2520and%2520object%2520qualifier%2520required%2520fo';" title="Google Bookmarks"><img src="http://blogs.law.harvard.edu/brandonhaynes/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow" id="dotnetkicks" href="javascript:window.location='http%3A%2F%2Fwww.dotnetkicks.com%2Fkick%2F%3Furl%3Dhttp%253A%252F%252Fblogs.law.harvard.edu%252Fbrandonhaynes%252F2009%252F09%252F08%252Fdotnetnuke-entity-framework-model-adapter%252F%26amp%3Btitle%3DReleased%253A%2520DotNetNuke%2520Entity%2520Framework%2520Model%2520Adapter';" title="DotNetKicks"><img src="http://blogs.law.harvard.edu/brandonhaynes/wp-content/plugins/sociable/images/dotnetkicks.png" title="DotNetKicks" alt="DotNetKicks" class="sociable-hovers" /></a>
	<a rel="nofollow" id="linkedin" href="javascript:window.location='http%3A%2F%2Fwww.linkedin.com%2FshareArticle%3Fmini%3Dtrue%26amp%3Burl%3Dhttp%253A%252F%252Fblogs.law.harvard.edu%252Fbrandonhaynes%252F2009%252F09%252F08%252Fdotnetnuke-entity-framework-model-adapter%252F%26amp%3Btitle%3DReleased%253A%2520DotNetNuke%2520Entity%2520Framework%2520Model%2520Adapter%26amp%3Bsource%3DFrom%2Bthe%2BDesk%2Bof%2BBrandon%2BHaynes%2BObservations%2Babout%2Bthe%2Bintersection%2Bof%2Btechnology%252C%2Bbusiness%252C%2Band%2Bintellectual%2Bproperty%26amp%3Bsummary%3DThe%2520Entity%2520Framework%2520ObjectContext%2520allows%2520for%2520development%2520using%2520a%2520model%2520automatically%2520generated%2520by%2520a%2520Visual%2520Studio%2520designer.%2520However%252C%2520when%2520deployed%2520within%2520DotNetNuke%252C%2520these%2520attributes%2520do%2520not%2520pick%2520up%2520the%2520database%2520owner%2520and%2520object%2520qualifier%2520required%2520fo';" title="LinkedIn"><img src="http://blogs.law.harvard.edu/brandonhaynes/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>
	<a rel="nofollow" id="stumbleupon" href="javascript:window.location='http%3A%2F%2Fwww.stumbleupon.com%2Fsubmit%3Furl%3Dhttp%253A%252F%252Fblogs.law.harvard.edu%252Fbrandonhaynes%252F2009%252F09%252F08%252Fdotnetnuke-entity-framework-model-adapter%252F%26amp%3Btitle%3DReleased%253A%2520DotNetNuke%2520Entity%2520Framework%2520Model%2520Adapter';" title="StumbleUpon"><img src="http://blogs.law.harvard.edu/brandonhaynes/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow" id="technorati" href="javascript:window.location='http%3A%2F%2Ftechnorati.com%2Ffaves%3Fadd%3Dhttp%253A%252F%252Fblogs.law.harvard.edu%252Fbrandonhaynes%252F2009%252F09%252F08%252Fdotnetnuke-entity-framework-model-adapter%252F';" title="Technorati"><img src="http://blogs.law.harvard.edu/brandonhaynes/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://blogs.law.harvard.edu/brandonhaynes/2009/09/08/dotnetnuke-entity-framework-model-adapter/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-sa/3.0/us/</creativeCommons:license>
	</item>
		<item>
		<title>Released: Entity Framework Runtime Model Adapter</title>
		<link>http://blogs.law.harvard.edu/brandonhaynes/2009/09/08/entity-framework-model-adapter/</link>
		<comments>http://blogs.law.harvard.edu/brandonhaynes/2009/09/08/entity-framework-model-adapter/#comments</comments>
		<pubDate>Tue, 08 Sep 2009 13:00:08 +0000</pubDate>
		<dc:creator>Brandon Haynes</dc:creator>
				<category><![CDATA[Entity Framework (EF)]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Adaptation]]></category>
		<category><![CDATA[Data]]></category>
		<category><![CDATA[Entity Framework]]></category>

		<guid isPermaLink="false">http://blogs.law.harvard.edu/brandonhaynes/?p=293</guid>
		<description><![CDATA[
The ObjectContext is a base class for all Entity Framework models.  While there exists a rich API for interacting with a model, the ability to adapt the underlying schema to the (potentially varying) run-time environment presents a serious shortcoming for many production applications.  These variances can potentially involve myriad considerations, from a change in database owner [...]]]></description>
			<content:encoded><![CDATA[<div>
<p>The <a href="http://msdn.microsoft.com/en-us/library/system.data.objects.objectcontext.aspx">ObjectContext</a> is a base class for all <a href="http://msdn.microsoft.com/en-us/library/aa697427(VS.80).aspx">Entity Framework</a> models.  While there exists a rich API for interacting with a model, the ability to adapt the underlying schema to the (potentially varying) run-time environment presents a serious shortcoming for many production applications.  These variances can potentially involve myriad considerations, from a change in database owner to modified table names (often by a production-specific prefix).  This can have a serious impact on large-scale deployment of applications using the Entity Framework (those familiar with my DotNetNuke-related work will immediately understand this consideration, where a run-time environment may be configured to use an arbitrary database owner or table prefix).</p>
<p>To remedy this issue, I have developed an <a href="http://efmodeladapter.codeplex.com/">adaptive framework</a> that converts an Entity Framework model generated by the Visual Studio designer into a highly configurable result.  This framework is designed to be flexible, extendable, and highly customizable.</p>
<p><span id="more-293"></span></p>
<p>My goals for any satisfactory solution were as follows:</p>
<ul>
<li>Run-time adjustment of an Entity Framework EDMX model, including:
<ul>
<li>Connection-based adaptation (e.g. use of a runtime-specified connection string)</li>
</ul>
</li>
<li>Run-time adjustment of model schema, including:
<ul>
<li>Adjusting data-level table prefixes or suffixes</li>
<li>Adjusting the owner of database objects</li>
</ul>
</li>
<li>Continued use of the Visual Studio Model designer</li>
<li>No tedious changes in the compiler-generated code</li>
<li>Continued use of an assembly-embedded EDMX model (and thereby no additional or external schema deployment files)</li>
</ul>
<p>It is unfortunate that the object model exposed by the Entity Framework is so frustratingly difficult to extend.  The underlying metadata are overwhelmingly read-only (and, frustratingly, many potentially useful classes are either internal or sealed).  Indeed, it seemed that there was no simple remedy to the problem at hand.</p>
<p>My solution utilizes the following approach:</p>
<ul>
<li>A Connection adapter is used to walk a model (and optionally adapt a connection string based upon a run-time environment) [Goal 1].</li>
<li>During the model walk, a dependency-injected model adapter is utilized to adapt various attributes of the model (currently storage, mapping, and association) [Goal 2].  Walking is reasonably inexpensive, and since the models are cached by type, performance is not affected.</li>
<li>The framework requires only a change in base class to an AdaptingObjectContext (which itself derives from an ObjectContext).  This allows the Visual Studio editor to continue to be utilized, and no direct EDMX manipulation is required (though, frustratingly, the base class of an entity model is not adjustable through the Visual Studio UI, necessitating a change in the code-generated file) [Goal 3, 4, 5].</li>
</ul>
<p>I use dependency injection to adapt attributed entities (database, table, and function names) into their adapted counterparts.  Additional adapters could easily be constructed for other domains, should any arise (to illustrate this point, a NonTransformingAdapter is included in the release, which performs no transformations).</p>
<p><a href="http://efmodeladapter.codeplex.com/">Click here</a> to access the project site for additional <a href="http://efmodeladapter.codeplex.com/">details</a> and <a href="http://efmodeladapter.codeplex.com/Release/ProjectReleases.aspx">downloads</a>.</p>
<p>As is all of my DotNetNuke-related work, this framework is available under a liberal open-source license for ready public consumption (and extension).  Though the content herein is protected under the license below, be sure to consult the project license (New BSD) for integration-related details.</p>
<p>As always, feedback is appreciated.</p>
<p>B</p></div>



Share on:


	<a rel="nofollow" id="digg" href="javascript:window.location='http%3A%2F%2Fdigg.com%2Fsubmit%3Fphase%3D2%26amp%3Burl%3Dhttp%253A%252F%252Fblogs.law.harvard.edu%252Fbrandonhaynes%252F2009%252F09%252F08%252Fentity-framework-model-adapter%252F%26amp%3Btitle%3DReleased%253A%2520Entity%2520Framework%2520Runtime%2520Model%2520Adapter%26amp%3Bbodytext%3D%250D%250A%250D%250AThe%25C2%25A0ObjectContext%2520is%2520a%2520base%2520class%2520for%2520all%2520Entity%2520Framework%2520models.%2520%25C2%25A0While%2520there%2520exists%2520a%2520rich%2520API%2520for%2520interacting%2520with%2520a%2520model%252C%2520the%2520ability%2520to%2520adapt%2520the%2520underlying%2520schema%2520to%2520the%2520%2528potentially%2520varying%2529%2520run-time%2520environment%2520presents%2520a%2520serious%2520shor';" title="Digg"><img src="http://blogs.law.harvard.edu/brandonhaynes/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow" id="del.icio.us" href="javascript:window.location='http%3A%2F%2Fdelicious.com%2Fpost%3Furl%3Dhttp%253A%252F%252Fblogs.law.harvard.edu%252Fbrandonhaynes%252F2009%252F09%252F08%252Fentity-framework-model-adapter%252F%26amp%3Btitle%3DReleased%253A%2520Entity%2520Framework%2520Runtime%2520Model%2520Adapter%26amp%3Bnotes%3D%250D%250A%250D%250AThe%25C2%25A0ObjectContext%2520is%2520a%2520base%2520class%2520for%2520all%2520Entity%2520Framework%2520models.%2520%25C2%25A0While%2520there%2520exists%2520a%2520rich%2520API%2520for%2520interacting%2520with%2520a%2520model%252C%2520the%2520ability%2520to%2520adapt%2520the%2520underlying%2520schema%2520to%2520the%2520%2528potentially%2520varying%2529%2520run-time%2520environment%2520presents%2520a%2520serious%2520shor';" title="del.icio.us"><img src="http://blogs.law.harvard.edu/brandonhaynes/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow" id="facebook" href="javascript:window.location='http%3A%2F%2Fwww.facebook.com%2Fshare.php%3Fu%3Dhttp%253A%252F%252Fblogs.law.harvard.edu%252Fbrandonhaynes%252F2009%252F09%252F08%252Fentity-framework-model-adapter%252F%26amp%3Bt%3DReleased%253A%2520Entity%2520Framework%2520Runtime%2520Model%2520Adapter';" title="Facebook"><img src="http://blogs.law.harvard.edu/brandonhaynes/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow" id="google" href="javascript:window.location='http%3A%2F%2Fwww.google.com%2Fbookmarks%2Fmark%3Fop%3Dedit%26amp%3Bbkmk%3Dhttp%253A%252F%252Fblogs.law.harvard.edu%252Fbrandonhaynes%252F2009%252F09%252F08%252Fentity-framework-model-adapter%252F%26amp%3Btitle%3DReleased%253A%2520Entity%2520Framework%2520Runtime%2520Model%2520Adapter%26amp%3Bannotation%3D%250D%250A%250D%250AThe%25C2%25A0ObjectContext%2520is%2520a%2520base%2520class%2520for%2520all%2520Entity%2520Framework%2520models.%2520%25C2%25A0While%2520there%2520exists%2520a%2520rich%2520API%2520for%2520interacting%2520with%2520a%2520model%252C%2520the%2520ability%2520to%2520adapt%2520the%2520underlying%2520schema%2520to%2520the%2520%2528potentially%2520varying%2529%2520run-time%2520environment%2520presents%2520a%2520serious%2520shor';" title="Google Bookmarks"><img src="http://blogs.law.harvard.edu/brandonhaynes/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow" id="dotnetkicks" href="javascript:window.location='http%3A%2F%2Fwww.dotnetkicks.com%2Fkick%2F%3Furl%3Dhttp%253A%252F%252Fblogs.law.harvard.edu%252Fbrandonhaynes%252F2009%252F09%252F08%252Fentity-framework-model-adapter%252F%26amp%3Btitle%3DReleased%253A%2520Entity%2520Framework%2520Runtime%2520Model%2520Adapter';" title="DotNetKicks"><img src="http://blogs.law.harvard.edu/brandonhaynes/wp-content/plugins/sociable/images/dotnetkicks.png" title="DotNetKicks" alt="DotNetKicks" class="sociable-hovers" /></a>
	<a rel="nofollow" id="linkedin" href="javascript:window.location='http%3A%2F%2Fwww.linkedin.com%2FshareArticle%3Fmini%3Dtrue%26amp%3Burl%3Dhttp%253A%252F%252Fblogs.law.harvard.edu%252Fbrandonhaynes%252F2009%252F09%252F08%252Fentity-framework-model-adapter%252F%26amp%3Btitle%3DReleased%253A%2520Entity%2520Framework%2520Runtime%2520Model%2520Adapter%26amp%3Bsource%3DFrom%2Bthe%2BDesk%2Bof%2BBrandon%2BHaynes%2BObservations%2Babout%2Bthe%2Bintersection%2Bof%2Btechnology%252C%2Bbusiness%252C%2Band%2Bintellectual%2Bproperty%26amp%3Bsummary%3D%250D%250A%250D%250AThe%25C2%25A0ObjectContext%2520is%2520a%2520base%2520class%2520for%2520all%2520Entity%2520Framework%2520models.%2520%25C2%25A0While%2520there%2520exists%2520a%2520rich%2520API%2520for%2520interacting%2520with%2520a%2520model%252C%2520the%2520ability%2520to%2520adapt%2520the%2520underlying%2520schema%2520to%2520the%2520%2528potentially%2520varying%2529%2520run-time%2520environment%2520presents%2520a%2520serious%2520shor';" title="LinkedIn"><img src="http://blogs.law.harvard.edu/brandonhaynes/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>
	<a rel="nofollow" id="stumbleupon" href="javascript:window.location='http%3A%2F%2Fwww.stumbleupon.com%2Fsubmit%3Furl%3Dhttp%253A%252F%252Fblogs.law.harvard.edu%252Fbrandonhaynes%252F2009%252F09%252F08%252Fentity-framework-model-adapter%252F%26amp%3Btitle%3DReleased%253A%2520Entity%2520Framework%2520Runtime%2520Model%2520Adapter';" title="StumbleUpon"><img src="http://blogs.law.harvard.edu/brandonhaynes/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow" id="technorati" href="javascript:window.location='http%3A%2F%2Ftechnorati.com%2Ffaves%3Fadd%3Dhttp%253A%252F%252Fblogs.law.harvard.edu%252Fbrandonhaynes%252F2009%252F09%252F08%252Fentity-framework-model-adapter%252F';" title="Technorati"><img src="http://blogs.law.harvard.edu/brandonhaynes/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://blogs.law.harvard.edu/brandonhaynes/2009/09/08/entity-framework-model-adapter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-sa/3.0/us/</creativeCommons:license>
	</item>
		<item>
		<title>Using the Entity Framework (LINQ to Entity) to IDataReader Adapter</title>
		<link>http://blogs.law.harvard.edu/brandonhaynes/2009/02/18/using-the-entity-framework-to-idatareader-adapter/</link>
		<comments>http://blogs.law.harvard.edu/brandonhaynes/2009/02/18/using-the-entity-framework-to-idatareader-adapter/#comments</comments>
		<pubDate>Wed, 18 Feb 2009 17:35:37 +0000</pubDate>
		<dc:creator>Brandon Haynes</dc:creator>
				<category><![CDATA[Entity Framework (EF)]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Entity Framework]]></category>
		<category><![CDATA[Linq]]></category>
		<category><![CDATA[Linq to Entities]]></category>

		<guid isPermaLink="false">http://blogs.law.harvard.edu/brandonhaynes/?p=37</guid>
		<description><![CDATA[In a recent article, I developed a theoretical basis for an adapter that allows for the adaptation of Entity Framework (EF) entities into IDataReader-implementing form, and announced the preview availability of this software. 
Herein I describe with more specificity the use of the adapter generator and the resultant adapters, and announce the release of the first production-ready [...]]]></description>
			<content:encoded><![CDATA[<p>In a <a href="http://blogs.law.harvard.edu/brandonhaynes/2008/12/14/entity-framework-to-idatareader-adapter/">recent article</a>, I developed a theoretical basis for an adapter that allows for the adaptation of Entity Framework (EF) entities into IDataReader-implementing form, and announced the <a href="http://www.codeplex.com/L2EDataReaderAdapter">preview availability</a> of this software. </p>
<p>Herein I describe with more specificity the use of the adapter generator and the resultant adapters, and announce the release of the first <a href="http://www.codeplex.com/L2EDataReaderAdapter">production-ready version</a> of the adapter generator software.</p>
<p><span id="more-37"></span></p>
<p>To introduce the use of the IDataReaderAdapter generator, consider a hypothetical software package with a data-layer defined as:</p>
<div style="border: dashed 1px black;padding: 0.5em;margin-left: 1em"><code>public interface IDataLayer<br />
    {<br />
    IDataReader GetSomeData();<br />
    IDataReader GetSomeOtherData(int aParameter);<br />
    }</code></div>
<p>Business-process code interacts with this data logic exclusively through the IDataLayer interface; this not only creates a clean <a href="http://en.wikipedia.org/wiki/Separation_of_concerns">separation of concerns</a>, but also allows for run-time specification of arbitrary IDataLayer implementation (typically a la <a href="http://en.wikipedia.org/wiki/Dependency_injection">dependency injection</a>).  This might be concretely implemented as:</p>
<div style="border: dashed 1px black;padding: 0.5em;margin-left: 1em"><code>public class DataLayer : IDataLayer<br />
    {<br />
    public IDataReader GetSomeData()<br />
        {<br />
        return SqlHelper.ExecuteReader(connectionString, "GetSomeData");<br />
        }</code><code><br />
    public IDataReader GetSomeOtherData(int aParameter)<br />
        {<br />
        return SqlHelper.ExecuteReader(connectionString, "GetSomeOtherData", aParameter);<br />
        }<br />
    }</code></div>
<p>For those developers wishing to move to Microsoft&#8217;s <a href="http://msdn.microsoft.com/en-us/library/aa697427(VS.80).aspx">Entity Framework</a> (EF), this presents a problem.  There is no ready method by which one may convert an <a href="http://msdn.microsoft.com/en-us/library/system.data.objects.dataclasses.entityobject.aspx">EntityObject</a> into an IDataRecord (and, similarly, an IEnumerable&lt;EntityObject&gt; into IDataReader).  Without such a conversion, it is not possible to transition to the EF without breaking the IDataLayer interface contract.  For those applications that are widely deployed (or have strong third-party augmentation), this is a very real problem indeed.</p>
<p>The IDataReaderAdapter generator allows for such a conversion in two ways:</p>
<ol>
<li>Compile-time adaption an EF schema into a set of IDataRecord-implementing wrappers <span style="text-decoration: underline">without</span> the use of reflection (and of O(n) property-lookup performance), or</li>
<li>Run-time adaption of an EntityObject (or any) object to an IDataRecord-implementing counterpart through the use of reflection.</li>
</ol>
<div>Developers are free to choose the method of adaption based upon his or her particular needs.</div>
<p><strong>Note:</strong> The adapter generator may be used to adapt <span style="text-decoration: underline">any</span> objects into IDataRecord/Reader-implementing objects.  Though the functionality described herein largely deals with the EF, the generator may be applied against any arbitrary object.</p>
<h4>Method 1: Compile-Time Adaption of an Entity Framework Schema</h4>
<p>To produce IDataRecord/Reader-implementing adapters at compile-time, we execute the adapter generator utility and point it at our EF schema.  The utility is executed in one of two ways, with syntax as:</p>
<p><code>IDataReaderAdapterGenerator<br />
        /entities:[.NET Entity Framework EDMX file]<br />
        /output:[output class filename]<br />
        [/entities:[entity regex]<br />
        [/language:vb|c#]</code></p>
<p><code>IDataReaderAdapterGenerator<br />
        /assembly:[source assembly filename]<br />
        /output:[output class filename]<br />
        [/objects:[entity regex]<br />
        [/language:vb|c#]</code></p>
<ul>
<li><strong>Entities/Assembly</strong>: Here, the first parameter may either be an EF Entity Data Model XML (EDMX) file or an arbitrary assembly.  The adapter generator will, assuming the former, parse the EDMX, extract entity objects, and create adapters.  If an assembly is specified, adapters are generated for each publicly-exposed object in that assembly.</li>
<li><strong>Output</strong>: This parameter specifies the output file for the generated adapters (i.e.; &#8220;Samples.cs&#8221; or &#8220;Samples.vb&#8221;).</li>
<li><strong>Entities/Objects</strong>: This setting specifies the particular entities or objects that are adapted.  This is specified as a regular expression (to adapt all entities or objects containing the word &#8220;Data&#8221; one would use the pattern &#8220;.*Data.*&#8221;).  By default, all available objects are adapted.</li>
<li><strong>Language</strong>: This allows specification of the target language for the generated adapters, either&nbsp;<a href="http://VB.NET" title="http://VB. " target="_blank">VB.NET</a> or C#.</li>
</ul>
<h4>Method #2: Run-time Adaption of Objects</h4>
<p>As an alternative to compile-time generation of IDataRecord/Reader-implementing objects, arbitrary objects may also be adapted at run-time.  Note, however, that this flexibility is achieved at the expense of the additional overhead required for the reflection used during access.  Consider this cost carefully &#8212; it is likely that compile-time adaption should be utilized wherever possible.</p>
<h4>Utilizing IDataRecord/Reader Adapters</h4>
<p>Irrespective of the method selected above, the resultant adapters are used in much the same manner.  By way of example, consider the data model that would result when the concrete DataLayer above were converted to utilize the EF.  This model would likely contain two entities, SomeData and SomeOtherData, and would be structured as follows:</p>
<p><a href="http://blogs.law.harvard.edu/brandonhaynes/files/2009/02/sample-data-model.jpg" rel="lightbox[37]"><img class="aligncenter size-medium wp-image-38" src="http://blogs.law.harvard.edu/brandonhaynes/files/2009/02/sample-data-model-300x212.jpg" alt="" width="300" height="212" /></a></p>
<p>If this EDMX existed in a file named SampleDataModel.edmx, we would adapt the model as:</p>
<p><code>IDataReaderAdapterGenerator /entities:SampleDataModel.edmx /output:AdaptedSample.cs</code></p>
<p>And we would implement our modern IDataLayer-implementing layer as:</p>
<div style="border: dashed 1px black;padding: 0.5em;margin-left: 1em"><code>using BrandonHaynes.Data;public class ModernDataLayer : IDataLayer<br />
    {<br />
    // Expose our entity model for new code to access<br />
    public ObjectContext EntityModel<br />
        { get { return new SampleDataModel()); }    public IDataReader GetSomeData()  </p>
<p>        {<br />
        using(var context = new SampleDataModel())<br />
            return new DataReaders.SomeDataDataReader(context.SomeData);<br />
        }</p>
<p></code><code>    public IDataReader GetSomeOtherData(int aParameter)<br />
        {<br />
        using(var context = new SampleDataModel())<br />
            return new DataReaders.SomeOtherDataDataReader(context.SomeOtherData<br />
                .Where(someOtherData =&gt; someOtherData.id == aParameter));<br />
        }<br />
    }</code></p>
</div>
<p>Note the use of BrandonHaynes.Data.DataReaders.SomeDataDataReader and BrandonHaynes.Data.DataReaders.SomeOtherDataDataReader to adapt returned EntityObjects (context.SomeData and context.SomeOtherData.Where(&#8230;)) into IDataReader-implementing interfaces.</p>
<p>To adapt objects at run-time using reflection, we would substitute these per-object adapters with the use of BrandonHaynes.Data.ReflectedDataReaderAdapter (or ReflectedDataRecordAdapter).  This would, for example, read as:</p>
<p><code>   return new ReflectedDataReaderAdapter(context.SomeData);</code></p>
<h4>Conclusion</h4>
<p>Herein we described the command-line use of the IDataReader Adapter generation tool to produce IDataRecord and IDataReader-adapting objects.  These objects may be used to modernize provider-based data layers that heavily rely on these interfaces, without breaking the existing contract. </p>
<p>The <a href="http://www.codeplex.com/L2EDataReaderAdapter">project site</a>, in addition to the source for both generators, includes two samples that should be reviewed by those interested in implementing these techniques in a production environment.  The first includes a sample model similar to that described herein, while the second includes a sample DotNetNuke data provider.  We will revisit this latter sample in subsequent entries as we explore advanced applications of the generated objects.</p>
<p>This entry will be followed by an exploration in more detail of the actual generated IDataReader and IDataRecord-adapting objects, including a review of the actual generated code.  For compile-time generated objects property conversion is performed in O(n) time with the mere addition of a constant-time hash (and lazy-loaded initialization).</p>
<p>As always, comments and feedback are greatly appreciated.</p>
<p>B</p>



Share on:


	<a rel="nofollow" id="digg" href="javascript:window.location='http%3A%2F%2Fdigg.com%2Fsubmit%3Fphase%3D2%26amp%3Burl%3Dhttp%253A%252F%252Fblogs.law.harvard.edu%252Fbrandonhaynes%252F2009%252F02%252F18%252Fusing-the-entity-framework-to-idatareader-adapter%252F%26amp%3Btitle%3DUsing%2520the%2520Entity%2520Framework%2520%2528LINQ%2520to%2520Entity%2529%2520to%2520IDataReader%2520Adapter%26amp%3Bbodytext%3DIn%2520a%2520recent%2520article%252C%2520I%2520developed%2520a%2520theoretical%2520basis%2520for%2520an%2520adapter%2520that%2520allows%2520for%2520the%2520adaptation%2520of%2520Entity%2520Framework%2520%2528EF%2529%2520entities%2520into%2520IDataReader-implementing%2520form%252C%2520and%2520announced%2520the%2520preview%2520availability%2520of%2520this%2520software.%25C2%25A0%250D%250A%250D%250AHerein%2520I%2520describe%2520w';" title="Digg"><img src="http://blogs.law.harvard.edu/brandonhaynes/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow" id="del.icio.us" href="javascript:window.location='http%3A%2F%2Fdelicious.com%2Fpost%3Furl%3Dhttp%253A%252F%252Fblogs.law.harvard.edu%252Fbrandonhaynes%252F2009%252F02%252F18%252Fusing-the-entity-framework-to-idatareader-adapter%252F%26amp%3Btitle%3DUsing%2520the%2520Entity%2520Framework%2520%2528LINQ%2520to%2520Entity%2529%2520to%2520IDataReader%2520Adapter%26amp%3Bnotes%3DIn%2520a%2520recent%2520article%252C%2520I%2520developed%2520a%2520theoretical%2520basis%2520for%2520an%2520adapter%2520that%2520allows%2520for%2520the%2520adaptation%2520of%2520Entity%2520Framework%2520%2528EF%2529%2520entities%2520into%2520IDataReader-implementing%2520form%252C%2520and%2520announced%2520the%2520preview%2520availability%2520of%2520this%2520software.%25C2%25A0%250D%250A%250D%250AHerein%2520I%2520describe%2520w';" title="del.icio.us"><img src="http://blogs.law.harvard.edu/brandonhaynes/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow" id="facebook" href="javascript:window.location='http%3A%2F%2Fwww.facebook.com%2Fshare.php%3Fu%3Dhttp%253A%252F%252Fblogs.law.harvard.edu%252Fbrandonhaynes%252F2009%252F02%252F18%252Fusing-the-entity-framework-to-idatareader-adapter%252F%26amp%3Bt%3DUsing%2520the%2520Entity%2520Framework%2520%2528LINQ%2520to%2520Entity%2529%2520to%2520IDataReader%2520Adapter';" title="Facebook"><img src="http://blogs.law.harvard.edu/brandonhaynes/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow" id="google" href="javascript:window.location='http%3A%2F%2Fwww.google.com%2Fbookmarks%2Fmark%3Fop%3Dedit%26amp%3Bbkmk%3Dhttp%253A%252F%252Fblogs.law.harvard.edu%252Fbrandonhaynes%252F2009%252F02%252F18%252Fusing-the-entity-framework-to-idatareader-adapter%252F%26amp%3Btitle%3DUsing%2520the%2520Entity%2520Framework%2520%2528LINQ%2520to%2520Entity%2529%2520to%2520IDataReader%2520Adapter%26amp%3Bannotation%3DIn%2520a%2520recent%2520article%252C%2520I%2520developed%2520a%2520theoretical%2520basis%2520for%2520an%2520adapter%2520that%2520allows%2520for%2520the%2520adaptation%2520of%2520Entity%2520Framework%2520%2528EF%2529%2520entities%2520into%2520IDataReader-implementing%2520form%252C%2520and%2520announced%2520the%2520preview%2520availability%2520of%2520this%2520software.%25C2%25A0%250D%250A%250D%250AHerein%2520I%2520describe%2520w';" title="Google Bookmarks"><img src="http://blogs.law.harvard.edu/brandonhaynes/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow" id="dotnetkicks" href="javascript:window.location='http%3A%2F%2Fwww.dotnetkicks.com%2Fkick%2F%3Furl%3Dhttp%253A%252F%252Fblogs.law.harvard.edu%252Fbrandonhaynes%252F2009%252F02%252F18%252Fusing-the-entity-framework-to-idatareader-adapter%252F%26amp%3Btitle%3DUsing%2520the%2520Entity%2520Framework%2520%2528LINQ%2520to%2520Entity%2529%2520to%2520IDataReader%2520Adapter';" title="DotNetKicks"><img src="http://blogs.law.harvard.edu/brandonhaynes/wp-content/plugins/sociable/images/dotnetkicks.png" title="DotNetKicks" alt="DotNetKicks" class="sociable-hovers" /></a>
	<img src="http://blogs.law.harvard.edu/brandonhaynes/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>
	<a rel="nofollow" id="stumbleupon" href="javascript:window.location='http%3A%2F%2Fwww.stumbleupon.com%2Fsubmit%3Furl%3Dhttp%253A%252F%252Fblogs.law.harvard.edu%252Fbrandonhaynes%252F2009%252F02%252F18%252Fusing-the-entity-framework-to-idatareader-adapter%252F%26amp%3Btitle%3DUsing%2520the%2520Entity%2520Framework%2520%2528LINQ%2520to%2520Entity%2529%2520to%2520IDataReader%2520Adapter';" title="StumbleUpon"><img src="http://blogs.law.harvard.edu/brandonhaynes/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow" id="technorati" href="javascript:window.location='http%3A%2F%2Ftechnorati.com%2Ffaves%3Fadd%3Dhttp%253A%252F%252Fblogs.law.harvard.edu%252Fbrandonhaynes%252F2009%252F02%252F18%252Fusing-the-entity-framework-to-idatareader-adapter%252F';" title="Technorati"><img src="http://blogs.law.harvard.edu/brandonhaynes/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://blogs.law.harvard.edu/brandonhaynes/2009/02/18/using-the-entity-framework-to-idatareader-adapter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-sa/3.0/us/</creativeCommons:license>
	</item>
		<item>
		<title>First Look: An Entity Framework (LINQ to Entity) to IDataReader Adapter</title>
		<link>http://blogs.law.harvard.edu/brandonhaynes/2008/12/14/entity-framework-to-idatareader-adapter/</link>
		<comments>http://blogs.law.harvard.edu/brandonhaynes/2008/12/14/entity-framework-to-idatareader-adapter/#comments</comments>
		<pubDate>Sun, 14 Dec 2008 19:15:27 +0000</pubDate>
		<dc:creator>Brandon Haynes</dc:creator>
				<category><![CDATA[Entity Framework (EF)]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Entity Framework]]></category>
		<category><![CDATA[Linq]]></category>
		<category><![CDATA[Linq to Entities]]></category>

		<guid isPermaLink="false">http://blogs.law.harvard.edu/brandonhaynes/?p=35</guid>
		<description><![CDATA[Microsoft&#8217;s Entity Framework (EF) introduces a new data design paradigm within .NET. This framework, however, can be difficult to implement in projects that internally rely heavily on the exchange of IDataReader-implementing objects between layers (or within interface contracts). This is a shortcoming that is not easily overcome, especially without a standardized method with which to [...]]]></description>
			<content:encoded><![CDATA[<p>Microsoft&#8217;s <a href="http://msdn.microsoft.com/en-us/library/bb386992.aspx">Entity Framework</a> (EF) introduces a new data design paradigm within .NET. This framework, however, can be difficult to implement in projects that internally rely heavily on the exchange of <a href="http://msdn.microsoft.com/en-us/library/system.data.idatareader.aspx">IDataReader</a>-implementing objects between layers (or within interface contracts). This is a shortcoming that is not easily overcome, especially without a standardized method with which to convert EF entities into an object implementing this interface. In many ways, migration of these projects to the Entity Framework is an all-or-nothing proposition.  This is a shortcoming that begs for remediation. </p>
<p><span id="more-35"></span>Indeed, it would be advantageous to provide adaptation for entities within an EF/LINQ to Entity (L2E) model that was usable in such a legacy system. New code could directly utilize entity classes, while legacy interfaces could function as before. Such a system could be incrementally converted to a full EF implementation. This incremental approach has many practical advantages.<br />
<a href="http://blogs.law.harvard.edu/brandonhaynes/files/2008/12/idatareaderadaptermodel.png" rel="lightbox[35]"><img class="alignright size-full wp-image-36" style="float: right" src="http://blogs.law.harvard.edu/brandonhaynes/files/2008/12/idatareaderadaptermodel.png" alt="Layering of the IDataReader adapter model on top of the Entity Framework stack" width="276" height="716" /></a><br />
Herein (and over the next few related entries) is described an approach that resolves this shortcoming.  In its current form, it exists as a new layer at the top of the EF stack, as depicted in Figure 1 (right).  This layer is responsible for adapting EF entities to objects that implement the IDataReader¹ interface.</p>
<p>The resultant adapted IDataReaders may be used in any way, include across layers, so long as the underlying entities expose those properties expected by a consumer (including exposure through direct entity relationship).</p>
<p>Accordingly, the primary goals for this project include the following:</p>
<ul>
<li>Provide a per-entity adapter for each entity in a model, where each adapter implements the IDataReader and IDataRecord interfaces for use in legacy systems.</li>
<li>The resultant IDataReaders should be internally strongly-typed and performant (and thereby not use reflection²).</li>
<li>Model adaptation should be straightforward and easy to update as the model itself changes.</li>
<li>Adapters should expose all entity properties, including &#8220;flattened&#8221; properties established through entity relationships (as exposed through conceptual model NavigationProperties).</li>
</ul>
<p>These objectives are best accomplished through code generation.  This has the attractive characteristics of: compile-time validation, multiple-language targeting, model synchronization on a per-compile basis, performance gains, and strongly-typed code (an advantage given that an entity contains an arbitrary set of unknown properties).</p>
<p>Once adapted, we may construct a function that converts an entity (or set of entities) to an IDataReader-implementing construct, with code of the following general form: </p>
<div style="border: dashed 1px black;padding: 0.5em;margin-left: 1em"><code>public IDataReader GetEntities()<br />
{<br />
using (var context = new EntityContext())<br />
        return new DataReaders.EntityDataReader(context.Entities);<br />
}</code></div>
<p>Over the next few entries, we (i) describe use of the IDataReaderAdapter generation tool, (ii) investigate the generated IDataReader-implementing adapters in more detail, (iii) generate and discuss performance metrics, and (iv) implement a case-study utilization of adapter generation (demonstrating a database-agnostic <a href="http://www.dotnetnuke.com">DotNetNuke</a> hybrid data provider).</p>
<p>This project is available for public evaluation and consumption <a title="Entity Framework IDataReader Adapter" href="http://www.codeplex.com/L2EDataReaderAdapter">here</a>³.  It is distributed with a liberal source license for use in production environments. </p>
<p>For any that find this approach useful, or for those with additional questions, comments, or constructive criticism, I ask that you provide feedback here (or at the CodePlex site).  Your assessments and observations are an important part of any continued development.</p>
<p>B</p>
<hr />¹ Though this entry often refers to the IDataReader interface, the approach described herein may also be used to generate IDataRecord-compatible objects.  This latter contract may be substituted for the former in most every reference herein.</p>
<p> </p>
<p>² For types not known at compile-time, we include a reflection-enabled adapter.  Note that such an adapter may be used to adapt <em>any</em> object, including non-EF entity objects.  This additional flexibility is achieved at the expense of overall performance.</p>
<p>³ Project is expected to go live on or about December 15th, 2008.</p>



Share on:


	<a rel="nofollow" id="digg" href="javascript:window.location='http%3A%2F%2Fdigg.com%2Fsubmit%3Fphase%3D2%26amp%3Burl%3Dhttp%253A%252F%252Fblogs.law.harvard.edu%252Fbrandonhaynes%252F2008%252F12%252F14%252Fentity-framework-to-idatareader-adapter%252F%26amp%3Btitle%3DFirst%2520Look%253A%2520An%2520Entity%2520Framework%2520%2528LINQ%2520to%2520Entity%2529%2520to%2520IDataReader%2520Adapter%26amp%3Bbodytext%3DMicrosoft%2527s%2520Entity%2520Framework%2520%2528EF%2529%2520introduces%2520a%2520new%2520data%2520design%2520paradigm%2520within%2520.NET.%2520This%2520framework%252C%2520however%252C%2520can%2520be%2520difficult%2520to%2520implement%2520in%2520projects%2520that%2520internally%2520rely%2520heavily%2520on%2520the%2520exchange%2520of%2520IDataReader-implementing%2520objects%2520between%2520layers%2520%2528o';" title="Digg"><img src="http://blogs.law.harvard.edu/brandonhaynes/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow" id="del.icio.us" href="javascript:window.location='http%3A%2F%2Fdelicious.com%2Fpost%3Furl%3Dhttp%253A%252F%252Fblogs.law.harvard.edu%252Fbrandonhaynes%252F2008%252F12%252F14%252Fentity-framework-to-idatareader-adapter%252F%26amp%3Btitle%3DFirst%2520Look%253A%2520An%2520Entity%2520Framework%2520%2528LINQ%2520to%2520Entity%2529%2520to%2520IDataReader%2520Adapter%26amp%3Bnotes%3DMicrosoft%2527s%2520Entity%2520Framework%2520%2528EF%2529%2520introduces%2520a%2520new%2520data%2520design%2520paradigm%2520within%2520.NET.%2520This%2520framework%252C%2520however%252C%2520can%2520be%2520difficult%2520to%2520implement%2520in%2520projects%2520that%2520internally%2520rely%2520heavily%2520on%2520the%2520exchange%2520of%2520IDataReader-implementing%2520objects%2520between%2520layers%2520%2528o';" title="del.icio.us"><img src="http://blogs.law.harvard.edu/brandonhaynes/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow" id="facebook" href="javascript:window.location='http%3A%2F%2Fwww.facebook.com%2Fshare.php%3Fu%3Dhttp%253A%252F%252Fblogs.law.harvard.edu%252Fbrandonhaynes%252F2008%252F12%252F14%252Fentity-framework-to-idatareader-adapter%252F%26amp%3Bt%3DFirst%2520Look%253A%2520An%2520Entity%2520Framework%2520%2528LINQ%2520to%2520Entity%2529%2520to%2520IDataReader%2520Adapter';" title="Facebook"><img src="http://blogs.law.harvard.edu/brandonhaynes/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow" id="google" href="javascript:window.location='http%3A%2F%2Fwww.google.com%2Fbookmarks%2Fmark%3Fop%3Dedit%26amp%3Bbkmk%3Dhttp%253A%252F%252Fblogs.law.harvard.edu%252Fbrandonhaynes%252F2008%252F12%252F14%252Fentity-framework-to-idatareader-adapter%252F%26amp%3Btitle%3DFirst%2520Look%253A%2520An%2520Entity%2520Framework%2520%2528LINQ%2520to%2520Entity%2529%2520to%2520IDataReader%2520Adapter%26amp%3Bannotation%3DMicrosoft%2527s%2520Entity%2520Framework%2520%2528EF%2529%2520introduces%2520a%2520new%2520data%2520design%2520paradigm%2520within%2520.NET.%2520This%2520framework%252C%2520however%252C%2520can%2520be%2520difficult%2520to%2520implement%2520in%2520projects%2520that%2520internally%2520rely%2520heavily%2520on%2520the%2520exchange%2520of%2520IDataReader-implementing%2520objects%2520between%2520layers%2520%2528o';" title="Google Bookmarks"><img src="http://blogs.law.harvard.edu/brandonhaynes/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow" id="dotnetkicks" href="javascript:window.location='http%3A%2F%2Fwww.dotnetkicks.com%2Fkick%2F%3Furl%3Dhttp%253A%252F%252Fblogs.law.harvard.edu%252Fbrandonhaynes%252F2008%252F12%252F14%252Fentity-framework-to-idatareader-adapter%252F%26amp%3Btitle%3DFirst%2520Look%253A%2520An%2520Entity%2520Framework%2520%2528LINQ%2520to%2520Entity%2529%2520to%2520IDataReader%2520Adapter';" title="DotNetKicks"><img src="http://blogs.law.harvard.edu/brandonhaynes/wp-content/plugins/sociable/images/dotnetkicks.png" title="DotNetKicks" alt="DotNetKicks" class="sociable-hovers" /></a>
	<img src="http://blogs.law.harvard.edu/brandonhaynes/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>
	<a rel="nofollow" id="stumbleupon" href="javascript:window.location='http%3A%2F%2Fwww.stumbleupon.com%2Fsubmit%3Furl%3Dhttp%253A%252F%252Fblogs.law.harvard.edu%252Fbrandonhaynes%252F2008%252F12%252F14%252Fentity-framework-to-idatareader-adapter%252F%26amp%3Btitle%3DFirst%2520Look%253A%2520An%2520Entity%2520Framework%2520%2528LINQ%2520to%2520Entity%2529%2520to%2520IDataReader%2520Adapter';" title="StumbleUpon"><img src="http://blogs.law.harvard.edu/brandonhaynes/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow" id="technorati" href="javascript:window.location='http%3A%2F%2Ftechnorati.com%2Ffaves%3Fadd%3Dhttp%253A%252F%252Fblogs.law.harvard.edu%252Fbrandonhaynes%252F2008%252F12%252F14%252Fentity-framework-to-idatareader-adapter%252F';" title="Technorati"><img src="http://blogs.law.harvard.edu/brandonhaynes/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://blogs.law.harvard.edu/brandonhaynes/2008/12/14/entity-framework-to-idatareader-adapter/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-sa/3.0/us/</creativeCommons:license>
	</item>
	</channel>
</rss>
