public async Task TestGetRoutesForAdvanceSearch_PostiveScenario()
        {
            List <RouteDTO> expectedRoutesForAdvancedSearch = await testCandidate.GetRoutesForAdvanceSearch(searchText, deliveryScenarioID);

            Assert.NotNull(expectedRoutesForAdvancedSearch);
            Assert.IsTrue(expectedRoutesForAdvancedSearch.Count == 2);
        }
        public async Task <IActionResult> GetRoutesForAdvanceSearch(string searchText)
        {
            if (string.IsNullOrEmpty(searchText))
            {
                throw new ArgumentNullException(nameof(searchText));
            }

            using (loggingHelper.RMTraceManager.StartTrace("WebService.GetRoutesForAdvanceSearch"))
            {
                string methodName = typeof(DeliveryRouteController) + "." + nameof(GetRoutesForAdvanceSearch);
                try
                {
                    loggingHelper.LogMethodEntry(methodName, LoggerTraceConstants.DeliveryRouteAPIPriority, LoggerTraceConstants.DeliveryRouteControllerMethodEntryEventId);

                    List <RouteDTO> deliveryRoutes = await deliveryRouteLogBusinessService.GetRoutesForAdvanceSearch(searchText, CurrentUserUnit);

                    loggingHelper.LogMethodExit(methodName, LoggerTraceConstants.DeliveryRouteAPIPriority, LoggerTraceConstants.DeliveryRouteControllerMethodExitEventId);
                    return(Ok(deliveryRoutes));
                }
                catch (AggregateException ae)
                {
                    foreach (var exception in ae.InnerExceptions)
                    {
                        loggingHelper.Log(exception, TraceEventType.Error);
                    }

                    var realExceptions = ae.Flatten().InnerException;
                    throw realExceptions;
                }
            }
        }