예제 #1
0
        public static IJobRepository Create(MongoUrl mongoUrl)
        {
            if (mongoUrl == null)
            {
                throw new ArgumentNullException(nameof(mongoUrl), "mongoUrl is null");
            }

            var provider = new MongoClientProvider(mongoUrl);

            return(new MongoRepository(provider));
        }
예제 #2
0
        public static IJobRepository Create(string connectionString)
        {
            if (string.IsNullOrEmpty(connectionString))
            {
                throw new ArgumentNullException(nameof(connectionString), "Connection string is empty");
            }

            var provider = new MongoClientProvider(connectionString);

            return(new MongoRepository(provider));
        }
예제 #3
0
        public static IJobRepository Create(MongoUrl mongoUrl)
        {
            if (mongoUrl == null)
            {
                throw new ArgumentNullException("Connections string is empty");
            }

            var provider = new MongoClientProvider(mongoUrl);

            return(new MongoRepository(provider));
        }