Skip to content

Instantly share code, notes, and snippets.

@andreasohlund
Created November 21, 2011 12:14
Show Gist options
  • Select an option

  • Save andreasohlund/1382470 to your computer and use it in GitHub Desktop.

Select an option

Save andreasohlund/1382470 to your computer and use it in GitHub Desktop.
UoW.Code
public class RavenUnitOfWork : IManageUnitsOfWork
{
readonly IDocumentSession session;
public RavenUnitOfWork(IDocumentSession session)
{
this.session = session;
}
public void Begin()
{
}
public void End(Exception ex)
{
if (ex == null)
session.SaveChanges();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment