Exemple #1
0
        /// <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);
        }
Exemple #2
0
 static RepositoryManager()
 {
     NinjectBinder.Initialize();
 }
Exemple #3
0
 /// <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>());
 }