You could replace Model.Start()/Stop() with the using-statement that
you showed inside your Model, to make it perhaps a little less ugly.
But it wouldn't help you if then later on the view needs something
that isn't eager loaded.

In one app I built using the MVP pattern I used DTOs or view models
that I assembled from the actual persistent entities. The views only
dealt with the view models, not with the entities. I don't quite
remember now, if I built the DTOs inside the presenter or in some form
of service layer. The latter case would be analogous to the case where
the app calls e.g. a web service the set and retrieve data. In this
case the view doesn't deal directly with entities either.

/Oskar


2009/12/16 Broken Pipe <[email protected]>:
> The only option I currently think of is using some global Start() Stop
> () methods for opening closing ISession so i will have to do things
> like:
>
> In my BuisnessObjectList Presenter:
> Model.Start();
> View.Items = Model.BuisnessObjectGetAll();
> Model.Stop();
>
> And this looks VERY ugly.
>
> --
>
> You received this message because you are subscribed to the Google Groups 
> "nhusers" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/nhusers?hl=en.
>
>
>

--

You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en.


Reply via email to