protected override int SaveEntities(List <Shape> shapes) { var groupedShapes = _shapeCollectionHelper.GroupByShapeId(shapes); var shapeBases = groupedShapes.Keys.ToList(); _shapeBaseRepository.BulkInsert(shapeBases); var shapePoints = groupedShapes.SelectMany(s => s.Value).ToList(); return(_repository.BulkInsert(shapePoints)); }
protected virtual int SaveEntities(List <T> entities) { _logger.LogInformation($"Saving entities of type {typeof(T).Name} in the database . . ."); return(_repository.BulkInsert(entities)); }