public string GetAllYoutubeChannelByUserIdAndProfileId(string UserId, string ProfileId) { try { Domain.Socioboard.Domain.YoutubeChannel lstYoutubeChannel = objYoutubeChannelRepository.getYoutubeChannelDetailsById(ProfileId, Guid.Parse(UserId)); return(new JavaScriptSerializer().Serialize(lstYoutubeChannel)); } catch (Exception ex) { Console.WriteLine(ex.StackTrace); return("Something Went Wrong"); } }
public string GetAllYoutubeChannelByUserIdAndProfileId(string UserId, string ProfileId) { Domain.Socioboard.Domain.YoutubeChannel lstYoutubeChannel=new Domain.Socioboard.Domain.YoutubeChannel (); try { if (objYoutubeChannelRepository.checkYoutubeChannelExists(ProfileId, Guid.Parse(UserId))) { lstYoutubeChannel = objYoutubeChannelRepository.getYoutubeChannelDetailsById(ProfileId, Guid.Parse(UserId)); } else { lstYoutubeChannel = objYoutubeChannelRepository.getYoutubeChannelDetailsById(ProfileId); } return new JavaScriptSerializer().Serialize(lstYoutubeChannel); } catch (Exception ex) { Console.WriteLine(ex.StackTrace); return "Something Went Wrong"; } }