public JobAssignmentRepository(DocumentDbSettings settings) { // Save the document db settings into a private data member and // instantiate an instance of the client. _documentDbSettings = settings; _documentClient = new DocumentClient(new Uri(_documentDbSettings.Endpoint), _documentDbSettings.AuthKey); }
internal static DocumentDbSettings GetDbSettings() { var settings = new DocumentDbSettings { AuthKey = Environment.GetEnvironmentVariable("DocumentDbAuthKey"), CollectionId = Environment.GetEnvironmentVariable("DocumentDbCollectionId"), Endpoint = Environment.GetEnvironmentVariable("DocumentDbEndpoint"), DatabaseId = Environment.GetEnvironmentVariable("DocumentDbDatabaseId") }; return(settings); }
public JobAssignmentRepository() : this(DocumentDbSettings.GetDbSettings()) { }