Created
January 18, 2013 01:40
-
-
Save mikeobrien/4561587 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 static IRepository<T> GetRepository<T>(ISession session, string table) where T : class, new() | |
{ | |
return GetRepositoryFactory<T>(session).CreateFor<T>(table); | |
} | |
public static IRepository<T> GetRepositoryFactory<T>(ISession session) where T : class, new() | |
{ | |
return new RepositoryFactory(new Gribble.NHibernate.ConnectionManager(session), Mappings(typeof(T).Assembly)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment