Esempio n. 1
0
        public MongoDBRepository(IRepositoryContext repositoryContext) : base(repositoryContext)
        {
            if (!(repositoryContext is IMongoDBRepositoryContext))
            {
                throw new ArgumentException("The specified Repository context is not the instance of IMongoDBRepositoryContext.");
            }

            this.mongoDBRepositoryContext = (IMongoDBRepositoryContext)repositoryContext;
        }
Esempio n. 2
0
 public MongoDBRepository(IRepositoryContext context)
 {
     if (context is IMongoDBRepositoryContext)
     {
         mongoDBRepositoryContext = context as MongoDBRepositoryContext;
     }
     else
     {
         throw new InvalidOperationException("Invalid repository context type.");
     }
 }
Esempio n. 3
0
 protected MongoDBRepository(IRepositoryContext context)
 {
     if (context is IMongoDBRepositoryContext)
     {
         this.mongoDBRepositoryContext = context as MongoDBRepositoryContext;
     }
     else
     {
         throw new InvalidOperationException("Invalid mongodbRepository context type ");
     }
 }