Esempio n. 1
0
        public static bool InsertURLToDB(List <string> urlList, string type)
        {
            bool isInsert = true;

            try
            {
                if (urlList != null && urlList.Any())
                {
                    foreach (var url in urlList.Where(q => !string.IsNullOrWhiteSpace(q)))
                    {
                        BaseDataDAL.InsertURL(url, type);
                    }
                }
            }
            catch (Exception ex)
            {
                isInsert = false;
                DailySitemapJob.Logger.Error(ex);
            }
            return(isInsert);
        }