vendredi 8 mai 2015

Wrapping My Head Around await async and NHibernate

Given this code:

private ISession _session;

public async Task<T> GetAsync<T>(int id) where T : ISomeEntity
{
    //how to call and return _session.Get<T>(id) asynchronous
}

Is it possible to call NHibernate ISession.Get<T>() asynchronously? Advisable? Not worth it?

Aucun commentaire:

Enregistrer un commentaire