private async Task <BulkImportResponse> AddGreenTaxiTripsAsVertices(IBulkExecutor graphbulkExecutor, CancellationToken token, List <GreenTrip> greenTrips) { //Add Trips as Vertexes ConvertBusinessObjects.ConvertGreenTripsToVertices(greenTrips, Vertices, Edges); return(await graphbulkExecutor.BulkImportAsync( Vertices, enableUpsert : true, disableAutomaticIdGeneration : true, maxConcurrencyPerPartitionKeyRange : null, maxInMemorySortingBatchSize : null, cancellationToken : token)); }
private async Task <BulkImportResponse> AddLocationAsVertices(IBulkExecutor graphbulkExecutor, CancellationToken token) { IEnumerable <Location> locations = from data in Utils.GetDataPerLines(@"C:\TaxiData\taxi+_zone_lookup.csv") let splitChr = data.Replace("\"", "").Split(",".ToCharArray()) select new Location { LocationID = Convert.ToInt32(splitChr[0]), Borough = splitChr[1], Zone = splitChr[2], service_zone = splitChr[3] }; //Add Trips as Vertexes return(await graphbulkExecutor.BulkImportAsync( ConvertBusinessObjects.ConvertLocationsToVertices(locations), enableUpsert : true, disableAutomaticIdGeneration : true, maxConcurrencyPerPartitionKeyRange : null, maxInMemorySortingBatchSize : null, cancellationToken : token)); }