To illustrate, I'm able to do this now:
1. private static async Task ProcessCustomers()
2. {
3. IList<Customers> customers;
4.
5. using (ISession session = NHibernateHelper.OpenSession())
6. {
7. customers = await session
8. .CreateCriteria<Customers>()
9. .ListAsync<Customers>();
10. }
11.
12. DoSomethingWithCustomers(customers);
13. }
14.
15. private static void DoSomethingWithCustomers(IList<Customers>
customers)
16. {
17. throw new NotImplementedException();
18. }
Op dinsdag 11 maart 2014 14:01:36 UTC+1 schreef anne erdtsieck:
>
> I'm creating async methods for NHibernate.
>
> This feature has been open for a while now and I'm trying to contribute
> this to NHibernate.
> See: https://nhibernate.jira.com/browse/NH-2088
>
> I already did an implementation for the ICriteria.ListAsync<T>() API
> method.
> I would love to have some feedback on my code.
>
> https://github.com/annemartijn0/nhibernate-core/tree/feature_ICriteria_ListAsync
>
> How should I approve this to create a reasonable merge request?
> The next months, I will be able to create other asynchronous API methods
> for NHibernate to.
>
> NHibernate just upgraded to .NET 4.0, so I chose not to change that.
> I won't be able to use the async methods for DbDataReader, as they come
> with 4.5,
> but I did make use of SqlCommand.BeginExecuteReader() and
> SqlCommand.EndExecuteReader().
>
> Kind regards,
> Annemartijn
>
--
---
You received this message because you are subscribed to the Google Groups
"nhibernate-development" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.