PC Review


Reply
Thread Tools Rate Thread

Architectural issues with Entity Framework

 
 
Oscar Thornell
Guest
Posts: n/a
 
      27th Oct 2009
Hi,

I am having serious trouble designing/architecting a viable solution for an
ASP.NET application and EF.

My main concern is changetracking and the lifecycle of the ObjectContext.
Ench problems with the stateless nature of a web application /ASP.NET page
life cycle. In my view change tracking in EF 1.0 is seriously broken for any
type of server oriented application (request/response pattern) involving
more than one entity at a time i.e. objectgraphs. If you wanted that kind of
solution you would have to code it manually.
Exploding/recombining/serializing the graph yourself, and with a decent
domain that would sum up to a ridiculous amount of code. After 2 months of
nearly gotten everything to work with quality the last time I pulled the
plug and went for NHibernate.

...and now once more I am standing in front of the same dilemma. The
technical requirement is simple: a layered ASP.NET application that uses EF.
I am free to start using VS.NET 2010 beta 2 and the EF 4.0 framework. The
POCO/T4 support in EF 4.0 is a good start and gives us the possibilities of
a separation for the model in a more DDD centric approach. But what about
change tracking for object graphs in a dettached/attached mode? Has EF 4
given us anything in this area? Or do we still need to wrap each entity in
the model in an ObjectProvider pattern and handle every entity separately in
the ASP.NET client?

Does it exsist a best practice from Microsoft (or anywhere else)? If so
please share a link...
Have some of you brilliant techies solved this? Am I missing something? :-(

Regards
Oscar Thornell

P.S Pleaes excuse the cross posting... D.S


 
Reply With Quote
 
 
 
 
Gregory A. Beamer
Guest
Posts: n/a
 
      27th Oct 2009
"Oscar Thornell" <(E-Mail Removed)> wrote in
news:BB0E6160-50BA-415B-A160-(E-Mail Removed):

> In my view change tracking in EF
> 1.0 is seriously broken for any type of server oriented application
> (request/response pattern) involving more than one entity at a time
> i.e. objectgraphs.


Agree whole heartedly. It is also a bad model, until POCO support, for SOA
implementation that cross platform boundaries.

> ..and now once more I am standing in front of the same dilemma. The
> technical requirement is simple: a layered ASP.NET application that
> uses EF. I am free to start using VS.NET 2010 beta 2 and the EF 4.0
> framework. The POCO/T4 support in EF 4.0 is a good start and gives us
> the possibilities of a separation for the model in a more DDD centric
> approach. But what about change tracking for object graphs in a
> dettached/attached mode? Has EF 4 given us anything in this area? Or
> do we still need to wrap each entity in the model in an ObjectProvider
> pattern and handle every entity separately in the ASP.NET client?
>
> Does it exsist a best practice from Microsoft (or anywhere else)? If
> so please share a link...


Check out this Developmentor article:
http://www.develop.com/entityframework4

It is a good entry and deals with the T4 templates and how you
ApplyChanges. I have not played through the whole scenario you have here,
so I cannot state fully whether or not EF 4 soles everything or not.

Peace and Grace,

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

Twitter: @gbworld
Blog: http://gregorybeamer.spaces.live.com

*******************************************
| Think outside the box! |
*******************************************
 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Architectural issues with Entity Framework Oscar Thornell Microsoft ADO .NET 1 27th Oct 2009 02:25 PM
Architectural issues with Entity Framework Oscar Thornell Microsoft C# .NET 1 27th Oct 2009 02:25 PM
Entity Framework - entity with multiple foreign keys to same table CGatto Microsoft ADO .NET 1 7th Aug 2009 07:51 PM
Entity Framework - Reassigning child entity's parent Norm Microsoft ASP .NET 3 6th Jul 2009 08:28 PM
How to relate a SQL based entity with an Object based entity in Entity Framework markla Microsoft ASP .NET 1 6th Oct 2008 10:42 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:49 PM.