/// <summary> /// Searches the database for any descriptions that do not have subintervals, then generates subintervals for those descriptions and saves to the database. /// </summary> /// <returns></returns> public static async Task <bool> EnsureAllLithologicDescriptionsHaveSubintervalsAsync() { bool keepRunning = true; int i = 1; while (keepRunning) { keepRunning = await SubintervalCreator.CreateSubIntervalsForDescriptions(100).ConfigureAwait(false); Console.WriteLine(string.Format("Task has completed {0} records", (i * 100)).ToString()); i++; } return(true); }
public static async Task <bool> GetLithologicSubIntervalsForMeasurements() { bool keepRunning = true; int skip = 0; int take = 10000; while (keepRunning) { keepRunning = await SubintervalCreator.GetMeasurementsForSubIntervals(skip, take); skip = skip + take; Console.WriteLine("Task Completed 10000 records"); } return(true); }
public static void AssociateSubIntervalsWithMeasurements() { var x = Task.Run(async() => await SubintervalCreator.GetLithologicSubIntervalsForMeasurements().ConfigureAwait(false)); x.Wait(); }