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
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