示例#1
0
 /// <summary>Initializes a new instance of the <see cref="BaseRepository"/> class.</summary>
 /// <param name="account">The account.</param>
 /// <param name="key">The key.</param>
 /// <param name="databaseName">Name of the database.</param>
 /// <param name="collectionName">Name of the collection.</param>
 public BaseRepository(string account, string key, string databaseName, string collectionName)
 {
     this.Context = new CosmosRepositoryContext(new CosmosClient(account, key), databaseName, collectionName);
 }
示例#2
0
 /// <summary>Initializes a new instance of the <see cref="BaseRepository"/> class.</summary>
 /// <param name="connectionString">The connection string.</param>
 /// <param name="databaseName">Name of the database.</param>
 /// <param name="collectionName">Name of the collection.</param>
 public BaseRepository(string connectionString, string databaseName, string collectionName)
 {
     this.Context = new CosmosRepositoryContext(new CosmosClient(connectionString), databaseName, collectionName);
 }