public async void DeleteManySuccessAsync() { var models = new GetModelService().GetModels(5); await _client.AddRangeAsync(models); var strings = models.Select(p => p.String); Assert.Equal(5L, await _client.DeleteAsync <TestModel>(p => strings.Contains(p.String))); }
public async void AddRangeAsync() { var models = new GetModelService().GetModels(4).ToList(); await _client.AddRangeAsync(models); var ids = models.Select(g => g.Id).ToList(); var results = _client.GetQueryable <TestModel>().Where(p => ids.Contains(p.Id)) .ToList(); Assert.Equal(models.OrderBy(p => p.Id).ToList().ToJson(), results.OrderBy(p => p.Id).ToList().ToJson()); }