tags:

views:

18

answers:

2

If I just want to keep things very simple, and just map my tables to POCO 1:1 with no collections on the entities

e.g. instead of doing :

class Order
class OrderItems

where you have:

Order o = new Order();
o.Items <-- collection of OrderItems that will query the db using lazy loading

I just have to do this manually:

Order o = myDAO.FindById(1);
OrderItems i = myDAO2.FindByOrderId(o.Id);

using this approach, do I still need to use castle.dynamic proxy dll and have to work around the medium trust issue?

+1  A: 

No you don't need castle dynamic proxy, but you need some kind of proxy to use NHibernate. Nhibernate has build in support for castle and linfu, but it is not difficult to create your own proxyfactory for any kind of dynamic proxy like spring or unity.

Paco
+1  A: 

If you are not using lazy loading you don't need proxy. Even when you download from nhforge, assemblies are split into required and required-for-lazy-loading.

epitka