Architectural issues with Entity Framework

O

Oscar Thornell

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
 
G

Gregory A. Beamer

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,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top