Skip to content

Instantly share code, notes, and snippets.

@kmckelvin
Created August 28, 2010 12:03
Show Gist options
  • Save kmckelvin/555065 to your computer and use it in GitHub Desktop.
Save kmckelvin/555065 to your computer and use it in GitHub Desktop.
public class MusicStoreContext : IMusicStoreContext
{
private readonly ISession _currentSession;
public MusicStoreContext(ISession currentSession)
{
_currentSession = currentSession;
}
public ISession Session
{
get { return _currentSession; }
}
public IQueryable<Album> Albums
{
get { return _currentSession.Query<Album>(); }
}
public IQueryable<Artist> Artists
{
get { return _currentSession.Query<Artist>(); }
}
public IQueryable<Cart> Carts
{
get { return _currentSession.Query<Cart>(); }
}
public IQueryable<Genre> Genres
{
get { return _currentSession.Query<Genre>(); }
}
public IQueryable<Order> Orders
{
get { return _currentSession.Query<Order>(); }
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment