Thanks, Jose. I understand.
On 5 oct, 15:16, José F. Romaniello <
jfromanie...@gmail.com> wrote:
> Hello Ronovelo, you don;'t need to use AllowOutsidePersitentCall for the
> Save method in this case.
> The parameter work in the following situation:
>
> public IEnumerable<Something> Execute(){
> return session.Query<Something>().Where(s => s.T...);
>
> }
>
> Because we don't know where you will resolve the Queryable and we don't know
> where/when you will hit the database... The session will be wrapped so,
> whenever you call ToList() outside the method boundray, it will start a
> transaction... execute the operation, and close the transaction.
>
> And this is useful, because in nhibernate every operation should be wraped
> in to an explicit transaction, not only writes.
>
> I would not encourage to returning queryables outside the service boundary,
> because it is hard to test and maintain.. But It can be useful in some
> situations. For instance, if you are working with a grid in winforms that
> support queryable, you can give the grid a queryable as the datasource and
> the grid will figure out the filter, and how to page etc the iqueryable.
>
> > Thanks in advance and congratulatios, uNhAddins is great!!!- Ocultar texto de la cita -