Architectural issues with Entity Framework

Discussion in 'ASP .Net' started by Oscar Thornell, Oct 27, 2009.

  1. 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
    Oscar Thornell, Oct 27, 2009
    #1
    1. Advertising

  2. "Oscar Thornell" <> wrote in
    news::

    > 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! |
    *******************************************
    Gregory A. Beamer, Oct 27, 2009
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Tormod Hystad

    Re: Events in ASP.Net, architectural

    Tormod Hystad, Jul 8, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    1,537
    Tormod Hystad
    Jul 8, 2003
  2. Samuel van Laere

    Entity Name or Entity Number?

    Samuel van Laere, Feb 24, 2007, in forum: HTML
    Replies:
    4
    Views:
    1,617
    Jukka K. Korpela
    Feb 24, 2007
  3. markla
    Replies:
    1
    Views:
    540
    Steven Cheng
    Oct 6, 2008
  4. Norm
    Replies:
    3
    Views:
    2,700
  5. ThatsIT.net.au

    Entity, problem with entity key

    ThatsIT.net.au, Sep 6, 2009, in forum: ASP .Net
    Replies:
    1
    Views:
    1,190
    ThatsIT.net.au
    Sep 7, 2009
Loading...

Share This Page