Business Layer Model
This is a fairly standard class diagram. It has the entities, their relationships, attributes and mappings to the database. This diagram leverages CSLA for the business persistence layer as well as NHibernate with Active Record for the data access layer. And then to make the business layer code even easier, we leverage a project by Ayende (http://www.ayende.com) for generating the query logic of our tools.

See the example below to see this in action:
    IList<Entity> entities = EntityCollection.Retrieve(Where.EntityDal.Name.Eq("Test"));
    foreach(Entity entity in entities)
    {
        //code goes here
    }


The example above says to the application domain "get all the entities where the name is equal to 'Test'". Once you understand the basics of the generated code this reads in code almost as easily as in the documentation.

CSLA
NHibernate
Active Record
Query Generator
Unit Testing

Last edited Nov 4, 2007 at 4:50 AM by pliekhus, version 6

Comments

No comments yet.