Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I highly recommend looking at Fowler's <a href="http://martinfowler.com/eaaCatalog/" rel="nofollow noreferrer">Patterns of Enterprise Architecture</a> book. There are a few different approaches to solving this sort of problem that he outlines nicely, including entity relationships.</p> <p>One of the more compelling items would be the Unit Of Work pattern, which is basically a collector, that observes the actions performed on your entities, and once your done with your action, it batches the appropriate database calls, and makes the request to the database. This pattern is one of the central concepts used by <a href="http://www.hibernate.org/343.html" rel="nofollow noreferrer">NHibernate</a>, which uses an object which implements IDisposable to signal the end of the "work". This allows you to wrap your actions in a using, and have the unit of work deal with the actions for you. </p> <p><b>Edit: Additional Information</b></p> <p><a href="http://martinfowler.com/eaaCatalog/unitOfWork.html" rel="nofollow noreferrer">This</a> is a link to the basic class structure of the Unit of Work...not really the most exciting thing in the world. Fowler provides more details in his book, some of which you can see <a href="http://books.google.com/books?id=FyWZt5DdvFkC&amp;lpg=PT217&amp;vq=Unit%20of%20work&amp;dq=Patterns%20of%20Enterprise%20Application%20Architecture&amp;client=firefox-a&amp;pg=PT217#v=onepage&amp;q=Unit%20of%20work&amp;f=false" rel="nofollow noreferrer">here</a>. You can also look at the Session object from NHibernate as a possible implementation ( I was able to track down the <a href="http://nhibernate.svn.sourceforge.net/viewvc/nhibernate/trunk/nhibernate/src/NHibernate/ISession.cs?revision=3745&amp;view=markup" rel="nofollow noreferrer">ISession</a> interface...not sure where the implementation lives)</p> <p>Hope this helps.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload