CodeSmith Community
Your Code. Your Way. Faster!

Easy Loading

Latest post 12-04-2006 4:09 PM by mike123. 1 replies.
  • 12-04-2006 3:21 PM

    • velum
    • Top 25 Contributor
    • Joined on 07-14-2006
    • Montréal, Qc, Canada
    • Posts 186
    • Points 4,686

    Easy Loading

    Hi!

    I would like to know whether it is good practice to use the Service Layer within the Entity Layer. I have a complex object having properties containing values based on calculations performed on subobjects. If the object was fetched using Deep Load, then it is not a problem to perform the calculations. However, if a simple getByObjectID was done to load the object, then the subobjects have to ne fetched before the calculations can be done. This is like doing Easy Loading. How can a complex Entity (meaning an Entity with children Entities), "realizing" that it is not fully loaded, load the missing parts of itself?

    Cheers!

    JF
     

    • Post Points: 35
  • 12-04-2006 4:09 PM In reply to

    • mike123
    • Top 10 Contributor
    • Joined on 02-25-2005
    • Toronto, Ontario
    • Posts 723
    • Points 16,805

    Re: Easy Loading

    velum,

    Wouldn't it be as simple as getting your object by its' EntityId and then performing the DeepLoad on it:

    Person entity =  getByPersonID(1)

    DeepLoad(entity) 

     Or something i missed from your question?
     

    velum:

    Hi!

    I would like to know whether it is good practice to use the Service Layer within the Entity Layer. I have a complex object having properties containing values based on calculations performed on subobjects. If the object was fetched using Deep Load, then it is not a problem to perform the calculations. However, if a simple getByObjectID was done to load the object, then the subobjects have to ne fetched before the calculations can be done. This is like doing Easy Loading. How can a complex Entity (meaning an Entity with children Entities), "realizing" that it is not fully loaded, load the missing parts of itself?

    Cheers!

    JF
     

    Mike Shatny ------------------------------------- Member of the .netTiers team http://www.nettiers.com -------------------------------------
    • Post Points: 5
Page 1 of 1 (2 items) | RSS
Copyright © 2008 CodeSmith Tools, LLC
Powered by Community Server (Commercial Edition), by Telligent Systems