public int SelectValidPhoneNumberCount(String international_format)
        {
            List <phoneNumInfo> data = null;

            try
            {
                using (SummerIntern db = new SummerIntern())
                {
                    data = db.phoneNumInfoes.Where(e => string.Equals(e.international_format, international_format)).ToList();
                }
            }
            catch (Exception)
            {
                throw;
            }
            return(data.Count);
        }
        public int SelectInvalidPhoneNumberCount(String number)
        {
            List <phoneNumInfo> data = null;

            try
            {
                string result = "False";
                using (SummerIntern db = new SummerIntern())
                {
                    data = db.phoneNumInfoes.Where(e => string.Equals(e.number, number) && string.Equals(e.valid, result)).ToList();
                }
            }
            catch (Exception)
            {
                throw;
            }
            return(data.Count);
        }
        public List <phoneNumberInfoDto> SelectInvalidPhoneNumberInfo(String number)
        {
            List <phoneNumInfo>       data   = null;
            List <phoneNumberInfoDto> values = null;

            try
            {
                string result = "False";
                using (SummerIntern db = new SummerIntern())
                {
                    data = db.phoneNumInfoes.Where(e => string.Equals(e.number, number) && string.Equals(e.valid, result)).ToList();


                    values = data.Select(er => new phoneNumberInfoDto
                    {
                        number               = er.number,
                        valid                = er.valid,
                        local_format         = er.local_format,
                        international_format = er.international_format,
                        country_prefix       = er.country_prefix,
                        country_code         = er.country_code,
                        country_name         = er.country_name,
                        location             = er.pn_location,
                        carrier              = er.carrier,
                        line_type            = er.line_type,
                        username             = er.username,
                        requestId            = er.requestId
                    }).ToList();
                }
            }
            catch (Exception)
            {
                throw;
            }

            return(values);
        }
        public List <phoneNumberInfoDto> SelectValidPhoneNumberInfo(String international_format)
        {
            List <phoneNumInfo>       data   = null;
            List <phoneNumberInfoDto> values = null;

            try
            {
                using (SummerIntern db = new SummerIntern())
                {
                    data = (from e in db.phoneNumInfoes
                            where string.Equals(e.international_format, international_format)
                            select e).ToList();

                    values = data.Select(er => new phoneNumberInfoDto
                    {
                        number               = er.number,
                        valid                = er.valid,
                        local_format         = er.local_format,
                        international_format = er.international_format,
                        country_prefix       = er.country_prefix,
                        country_code         = er.country_code,
                        country_name         = er.country_name,
                        location             = er.pn_location,
                        carrier              = er.carrier,
                        line_type            = er.line_type,
                        username             = er.username,
                        requestId            = er.requestId
                    }).ToList();
                }
            }
            catch (Exception)
            {
                throw;
            }

            return(values);
        }