private async Task <bool> DeleteIrisFilesFromSolr()
        {
            try
            {
                var url = $"{_url}/select?fl=id,uid&q=*:*";
                using (var client = new HttpClient())
                {
                    var result = await client.GetAsync(url);

                    string resultContent = await result.Content.ReadAsStringAsync();

                    dynamic d        = JsonConvert.DeserializeObject <dynamic>(resultContent);
                    var     response = d.response;
                    Int64   numFound = Numerics.GetInt(response.numFound);
                    if (numFound > 0)
                    {
                        using (var httpClient = new HttpClient())
                        {
                            url = url + $"&start=0&rows={numFound}";
                            var httpResult = await client.GetAsync(url);

                            string httpResultContent = await httpResult.Content.ReadAsStringAsync();

                            dynamic httpD        = JsonConvert.DeserializeObject <dynamic>(httpResultContent);
                            var     httpResponse = httpD.response;
                            string  docs         = Convert.ToString(httpResponse.docs);
                            List <epd_search_delete_model> solr = JsonConvert.DeserializeObject <List <epd_search_delete_model> >(docs);

                            SQLHandler sqlHandler = new SQLHandler(_connectionString);
                            var        search     = sqlHandler.ExecuteAsListUsingQuery <string>("Select uid From epd_search ; ");
                            solr.RemoveAll(x => search.Any(y => y == x.uid.FirstOrDefault()));
                            foreach (var item in solr)
                            {
                                var dl = await DeleteRecord(item.id);
                            }
                        }
                    }
                }
                return(true);
            }
            catch (Exception)
            {
                return(false);
            }
        }
        private void btnExecuteAsListUsingSQLQuery_Click(object sender, EventArgs e)
        {
            try
            {
                lblTitle.Text = "Execute As List Using SQL Query : GET LIST OF CITIES";

                string query = QueryBase.GetAllFrom(eTables.city);

                List <City> lstCities = null;
                Task.Factory.StartNew(() =>
                {
                    lstCities = sqlHandler.ExecuteAsListUsingQuery <City>(query);
                }).Wait();

                dgvResult.DataSource = lstCities;
            }
            catch (Exception ex)
            {
                DisplayError(ex.Message);
            }
        }
        public async Task <string> Sync()
        {
            try
            {
                SQLHandler sqlHandler = new SQLHandler(_connectionString);
                var        search     = sqlHandler.ExecuteAsListUsingQuery <epd_search_model>("Select * From epd_search ; ");
                foreach (var item in search)
                {
                    await FindRecord(item);

                    var add = await AddRecord(item);
                }
                await DeleteIrisFilesFromSolr();

                return("200");
            }
            catch (System.Exception ex)
            {
                return(ex.Message);
                // HANDLE YOUR EXCEPTION HERE
            }
        }