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; }
public MongoDBRepository(IRepositoryContext context) { if (context is IMongoDBRepositoryContext) { mongoDBRepositoryContext = context as MongoDBRepositoryContext; } else { throw new InvalidOperationException("Invalid repository context type."); } }
protected MongoDBRepository(IRepositoryContext context) { if (context is IMongoDBRepositoryContext) { this.mongoDBRepositoryContext = context as MongoDBRepositoryContext; } else { throw new InvalidOperationException("Invalid mongodbRepository context type "); } }