Beispiel #1
0
 public SqlRepository(IRepositoryContext repositoryContext) : base(repositoryContext)
 {
     if (repositoryContext is ISqlRepositoryContext)
     {
         this.sqlRepositoryContext = (ISqlRepositoryContext)repositoryContext;
     }
     else
     {
         throw new ArgumentException("The specified Repository context is not the instance of ISqlRepositoryContext.");
     }
 }
Beispiel #2
0
        private ICacheManager cacheManager = null; //CacheFactory.GetCacheManager();

        public SqlRepository(IRepositoryContext repositoryContext) : base(repositoryContext)
        {
            if (repositoryContext is ISqlRepositoryContext)
            {
                this.sqlRepositoryContext = (ISqlRepositoryContext)repositoryContext;
            }
            else
            {
                throw new ArgumentException("The provided repository context type is invalid. SqlRepository requires an instance of SqlRepositoryContext to be initialized.");
            }
        }