/// <summary> /// Gets factory that creates the conenctions. /// </summary> /// <returns>The connection</returns> public static IConnectionProvider GetConnectionProvider() { if (_connectionProvider == null) { lock (Lock) { _connectionProvider = NinjectBinder.Get <IConnectionProvider>(); } } return(_connectionProvider); }
/// <summary> /// Gets an instance of a class implementing TRepositoryOfEntity /// </summary> /// <typeparam name="TRepositoryOfEntity">The interface of the requested repository</typeparam> /// <returns>the instance implementing the interface</returns> public static TRepositoryOfEntity GetRepository <TRepositoryOfEntity>() { return(NinjectBinder.Get <TRepositoryOfEntity>()); }