示例#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);
        }
示例#2
0
 static RepositoryManager()
 {
     NinjectBinder.Initialize();
 }
示例#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>());
 }