private static async Task SeedCollectionAsync(string seedList, string collection, string database, string deleteCacheKey) { try { var repository = new DocumentCommandRepository <TDocument>(collection, database); { var seeds = JsonConvert.DeserializeObject <List <TDocument> >(seedList); foreach (var seed in seeds) { await repository.InsertAsync(seed); } } } catch (Exception ex) { ElmahLogger.LogError(ex); } }
public DocumentCommandService(string currentTenantId = "") { this.repository = new DocumentCommandRepository <TDocument>(currentTenantId); }