Using and ORM/DAL layer

Using and ORM/DAL layer

Old forum URL: forums.lhotka.net/forums/t/681.aspx


Bonio posted on Thursday, July 20, 2006

I have been doing some research into the pros/cons of having a ORM like EasyObjects or NHibernate.

Outside of the advantages of being able to easily swap databases and to have strongly typed objects, is there any real point. The other advantage would be to comply with MS Patterns and Practices for Data Objects - does CSLA.Net provide similar efficiency??

In the past I have found the 1:1 mapping done by ORM was rather restrictive in an OO environment,

Any programming opinions on this - should I/shouldn't I? I have no need to shift database types but would be interested in other users experiences/opinions.

Thanks

Bonio

ajj3085 replied on Thursday, July 20, 2006

I think its a good idea.  Right now you have no need to support other databases, but that doesn't mean you won't in the future.

Also, having a strongly typed representation of your data tables is a huge advantage.  You change the database, update the classes which represent the tables, and a simple compile will tell you where the changes break your business layer.. no need to manually search for strings in files to figure out which sql needs to be updated.

Bonio replied on Thursday, July 20, 2006

If I do go with an ORM tool such as Easy Objects or NHibernate, how would these effect the transactional status of queries that we currently get under CSLA? Also can anyone recommend an ORM tool that fits well with CSLA?

Thanks

Bonio

ajj3085 replied on Thursday, July 20, 2006

I haven't used either, but I believe others here have posted that both worked well within Csla.  I would think that you can do transactions with either.

SeanD replied on Friday, July 21, 2006

I've been using Paul Wilson's ORM (ormapper.net) for some time in My CSLA.NET based projects. It makes live so much easier.

Regards,

Sean.

Copyright (c) Marimer LLC