예제 #1
0
        public async Task DeleteMultipleModel <T>(List <Guid> ids) where T : QueryModel
        {
            var tasks = new List <Task>();

            foreach (var id in ids)
            {
                tasks.Add(DeleteById <T>(id));
            }
            await DocumentDbParallelHelper.RunParallel(_offerThroughput, tasks);
        }
예제 #2
0
        public async Task SaveQueryModelList <T>(List <T> queryModels) where T : QueryModel
        {
            var tasks = new List <Task>();

            foreach (var docModel in queryModels)
            {
                tasks.Add(Save(docModel));
            }
            await DocumentDbParallelHelper.RunParallel(_offerThroughput, tasks);
        }