Skip to content

Instantly share code, notes, and snippets.

@Lucasus
Created April 19, 2015 15:08
Show Gist options
  • Save Lucasus/609dbf2a5cdc00f6ab3b to your computer and use it in GitHub Desktop.
Save Lucasus/609dbf2a5cdc00f6ab3b to your computer and use it in GitHub Desktop.
Helper unit of work methods
private Action Do(Action<UnitOfWork> work)
{
return () => _unitOfWorkFactory.Create().Do(work);
}
private Func<T> Do<T>(Func<UnitOfWork, T> work)
{
return () => _unitOfWorkFactory.Create().Do(work);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment