<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Architecting Your Data Access Layer with the Entity Framework</title>
	<atom:link href="http://www.wadewegner.com/2009/06/architecting-your-data-access-layer-with-the-entity-framework/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.wadewegner.com/2009/06/architecting-your-data-access-layer-with-the-entity-framework/</link>
	<description>From the whiteboard to the keyboard</description>
	<lastBuildDate>Sat, 04 Feb 2012 13:53:05 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
	<item>
		<title>By: Mohsin Khan</title>
		<link>http://www.wadewegner.com/2009/06/architecting-your-data-access-layer-with-the-entity-framework/#comment-1608</link>
		<dc:creator>Mohsin Khan</dc:creator>
		<pubDate>Sat, 19 Nov 2011 15:36:38 +0000</pubDate>
		<guid isPermaLink="false">http://blog.wadewegner.com/index.php/2009/06/26/architecting-your-data-access-layer-with-the-entity-framework/#comment-1608</guid>
		<description>I am working on a web based project in DotNet4.0 where i want to implement 3 layer architechture and EF as data-access layer. EF gives me a rapid data connectivity and querying capability to the database. At the same time i don&#039;t want to create separate BusinessObjects [data traveller entities] throughout the 3 layers and infact want to use the same .edmx entities created automatically. There are around 50 tables in the database and creating entities foreach table is becoming very time-consuming. other thing is tables are not binded with any foreign key relationships so that is not mapped in .edmx as well. carrying different sets of data throughout the layers without custom entities is another major issue.</description>
		<content:encoded><![CDATA[<p>I am working on a web based project in DotNet4.0 where i want to implement 3 layer architechture and EF as data-access layer. EF gives me a rapid data connectivity and querying capability to the database. At the same time i don&#8217;t want to create separate BusinessObjects [data traveller entities] throughout the 3 layers and infact want to use the same .edmx entities created automatically. There are around 50 tables in the database and creating entities foreach table is becoming very time-consuming. other thing is tables are not binded with any foreign key relationships so that is not mapped in .edmx as well. carrying different sets of data throughout the layers without custom entities is another major issue.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sri</title>
		<link>http://www.wadewegner.com/2009/06/architecting-your-data-access-layer-with-the-entity-framework/#comment-208</link>
		<dc:creator>sri</dc:creator>
		<pubDate>Sat, 15 May 2010 14:08:37 +0000</pubDate>
		<guid isPermaLink="false">http://blog.wadewegner.com/index.php/2009/06/26/architecting-your-data-access-layer-with-the-entity-framework/#comment-208</guid>
		<description>Excellent information, Can you upload the sample code..?</description>
		<content:encoded><![CDATA[<p>Excellent information, Can you upload the sample code..?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Reza Zareian Fard</title>
		<link>http://www.wadewegner.com/2009/06/architecting-your-data-access-layer-with-the-entity-framework/#comment-207</link>
		<dc:creator>Reza Zareian Fard</dc:creator>
		<pubDate>Sat, 13 Feb 2010 19:21:58 +0000</pubDate>
		<guid isPermaLink="false">http://blog.wadewegner.com/index.php/2009/06/26/architecting-your-data-access-layer-with-the-entity-framework/#comment-207</guid>
		<description>Hi,
It&#039;s really nice that you think on DAL and EF Architectural view but as kunal said would you please give us an example code?
All the best</description>
		<content:encoded><![CDATA[<p>Hi,<br />
It&#8217;s really nice that you think on DAL and EF Architectural view but as kunal said would you please give us an example code?<br />
All the best</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kunal</title>
		<link>http://www.wadewegner.com/2009/06/architecting-your-data-access-layer-with-the-entity-framework/#comment-206</link>
		<dc:creator>Kunal</dc:creator>
		<pubDate>Mon, 24 Aug 2009 13:17:22 +0000</pubDate>
		<guid isPermaLink="false">http://blog.wadewegner.com/index.php/2009/06/26/architecting-your-data-access-layer-with-the-entity-framework/#comment-206</guid>
		<description>Hello.
Its nice architectural view of EF. But can you please explain the same with example?

Thanks in advance</description>
		<content:encoded><![CDATA[<p>Hello.<br />
Its nice architectural view of EF. But can you please explain the same with example?</p>
<p>Thanks in advance</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul Rayner</title>
		<link>http://www.wadewegner.com/2009/06/architecting-your-data-access-layer-with-the-entity-framework/#comment-205</link>
		<dc:creator>Paul Rayner</dc:creator>
		<pubDate>Fri, 03 Jul 2009 14:32:24 +0000</pubDate>
		<guid isPermaLink="false">http://blog.wadewegner.com/index.php/2009/06/26/architecting-your-data-access-layer-with-the-entity-framework/#comment-205</guid>
		<description>I have no experience with using the EF, so I am interested in learning more about its strengths and weaknesses.

My personal preference is for high separation of concerns, and for (where possible) adherence to the dependency inversion principle by not having the domain/business layer depend on a concrete implementation of the data access layer. From what I understand, this is roughly what you mean by Full Encapsulation approach.

I&#039;ve been using NHibernate for two years now and have found it to be a framework that is very congenial to encapsulating data access completely away from the business layer - this allows me to have the business logic at the core of my system and treat persistence (data access) more as an infrastructure (secondary) concern than the foundational layer.

In terms of how this works, in this approach POCO&#039;s have no dependencies on data access base classes - they typically do not inherit from a base class. Repository classes in the data access layer encapsulate NHibernate queries. But these Repositories are manifested in the business layer as interfaces, so no hard dependencies there, and full testability through unit tests of the business layer objects. Nhibernate has session management to support the unit of work pattern in the persistence of the business objects. There are certainly some things in NHibernate that sometimes make it a challenge to use, but overall I have been very pleased with what it can do.

Can you adopt this type of approach with the EF? Also, can you elaborate more on how SQL queries end up spread through the layers in the Partial approach? This seems to me to be a major drawback. What type is &quot;var db&quot; in each approach? Is it an interface, or does that depend on which approach you are adopting?

Thanks for the very interesting and thoughtful posting.

Paul.

&lt;abbr&gt;&lt;em&gt;Paul Rayner’s last blog post..&lt;a href=&quot;http://virtualgenius.spaces.live.com/Blog/cns!CC3C966FA733667C!744.entry&quot; rel=&quot;nofollow&quot;&gt;Agile 2009 – My Session Proposals&lt;/a&gt;&lt;/abbr&gt;&lt;/em&gt;</description>
		<content:encoded><![CDATA[<p>I have no experience with using the EF, so I am interested in learning more about its strengths and weaknesses.</p>
<p>My personal preference is for high separation of concerns, and for (where possible) adherence to the dependency inversion principle by not having the domain/business layer depend on a concrete implementation of the data access layer. From what I understand, this is roughly what you mean by Full Encapsulation approach.</p>
<p>I&#8217;ve been using NHibernate for two years now and have found it to be a framework that is very congenial to encapsulating data access completely away from the business layer &#8211; this allows me to have the business logic at the core of my system and treat persistence (data access) more as an infrastructure (secondary) concern than the foundational layer.</p>
<p>In terms of how this works, in this approach POCO&#8217;s have no dependencies on data access base classes &#8211; they typically do not inherit from a base class. Repository classes in the data access layer encapsulate NHibernate queries. But these Repositories are manifested in the business layer as interfaces, so no hard dependencies there, and full testability through unit tests of the business layer objects. Nhibernate has session management to support the unit of work pattern in the persistence of the business objects. There are certainly some things in NHibernate that sometimes make it a challenge to use, but overall I have been very pleased with what it can do.</p>
<p>Can you adopt this type of approach with the EF? Also, can you elaborate more on how SQL queries end up spread through the layers in the Partial approach? This seems to me to be a major drawback. What type is &#8220;var db&#8221; in each approach? Is it an interface, or does that depend on which approach you are adopting?</p>
<p>Thanks for the very interesting and thoughtful posting.</p>
<p>Paul.</p>
<p><abbr><em>Paul Rayner’s last blog post..<a href="http://virtualgenius.spaces.live.com/Blog/cns!CC3C966FA733667C!744.entry" rel="nofollow">Agile 2009 – My Session Proposals</a></em></abbr></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daily Links for Monday, June 29th, 2009</title>
		<link>http://www.wadewegner.com/2009/06/architecting-your-data-access-layer-with-the-entity-framework/#comment-204</link>
		<dc:creator>Daily Links for Monday, June 29th, 2009</dc:creator>
		<pubDate>Mon, 29 Jun 2009 11:31:22 +0000</pubDate>
		<guid isPermaLink="false">http://blog.wadewegner.com/index.php/2009/06/26/architecting-your-data-access-layer-with-the-entity-framework/#comment-204</guid>
		<description>[...] Architecting Your Data Access Layer with the Entity Framework &#124; Architecting with .NET [...] </description>
		<content:encoded><![CDATA[<p>[...] Architecting Your Data Access Layer with the Entity Framework | Architecting with .NET [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>

