public async Task <IEnumerable <TKey> > Add(IEnumerable <T> values) { using (var trans = _unitOfWork.BeginTransaction()) { await ValidateDto(values, ValidationType.AddValidation); var entities = MapFromDtos(values, ValidationType.AddValidation); foreach (var entity in entities) { AddEntity(entity); } _repository.AddRange(entities); await CommitTransaction(trans); return(entities.Select(GetKey)); } }