Created
August 28, 2010 12:03
-
-
Save kmckelvin/555065 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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