public static BuiltOptions UseMongodb(this BuiltOptions options, MongoUrl url) { if (url == null) { throw new ArgumentNullException(nameof(url)); } options.Url = url; return(options.UseMongodb(MongoClientSettings.FromUrl(url))); }
public static BuiltOptions UseMongodb(this BuiltOptions options, string connectionString) { if (string.IsNullOrWhiteSpace(connectionString)) { throw new ArgumentNullException(nameof(connectionString)); } options.ConnectionString = connectionString; return(options.UseMongodb(new MongoUrl(connectionString))); }