예제 #1
0
 public string GetAllYoutubeAccounts()
 {
     try
     {
         YoutubeAccountRepository objyoutube = new YoutubeAccountRepository();
         List <Domain.Socioboard.Domain.YoutubeAccount> lstYoutubeAcc = objyoutube.getAllYoutubeAccounts();
         return(new JavaScriptSerializer().Serialize(lstYoutubeAcc));
     }
     catch (Exception ex)
     {
         Console.WriteLine(ex.StackTrace);
         return("Something Went Wrong");
     }
 }
        public string GetAllYoutubeAccounts()
        {
            JavaScriptSerializer serializer = new JavaScriptSerializer();

            serializer.MaxJsonLength = 2147483647;
            try
            {
                YoutubeAccountRepository objyoutube = new YoutubeAccountRepository();
                List <Domain.Socioboard.Domain.YoutubeAccount> lstYoutubeAcc = objyoutube.getAllYoutubeAccounts();
                return(serializer.Serialize(lstYoutubeAcc));
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.StackTrace);
                return(serializer.Serialize(new List <Domain.Socioboard.Domain.YoutubeAccount>()));
            }
        }