public void GetLinkedinCompanyPageFeeds(oAuthLinkedIn _oauth, string UserId, string PageId)
        {
            LinkedinPageUpdate         objlinkedinpageupdate = new LinkedinPageUpdate();
            LinkedinPagePostRepository objlipagepostRepo     = new LinkedinPagePostRepository();
            List <LinkedinPageUpdate.CompanyPagePosts> objcompanypagepost = new List <LinkedinPageUpdate.CompanyPagePosts>();

            objcompanypagepost = objlinkedinpageupdate.GetPagePosts(_oauth, PageId);
            LinkedinCompanyPagePosts lipagepost = new LinkedinCompanyPagePosts();

            foreach (var item in objcompanypagepost)
            {
                lipagepost.Id           = Guid.NewGuid();
                lipagepost.Posts        = item.Posts;
                lipagepost.PostDate     = Convert.ToDateTime(item.PostDate);
                lipagepost.EntryDate    = DateTime.Now;
                lipagepost.UserId       = Guid.Parse(UserId);
                lipagepost.Type         = item.Type;
                lipagepost.PostId       = item.PostId;
                lipagepost.UpdateKey    = item.UpdateKey;
                lipagepost.PageId       = PageId;
                lipagepost.PostImageUrl = item.PostImageUrl;
                lipagepost.Likes        = item.Likes;
                lipagepost.Comments     = item.Comments;
                if (!objlipagepostRepo.checkLinkedInPostExists(lipagepost.PostId, lipagepost.UserId))
                {
                    objlipagepostRepo.addLinkedInPagepost(lipagepost);
                }
                else
                {
                    objlipagepostRepo.updateLinkedinPostofPage(lipagepost);
                }
            }
        }
        public static List <LinkedinPageUpdate.CompanyPagePosts> GetLinkedinCompanyPageFeeds(oAuthLinkedIn _oauth, string PageId)
        {
            LinkedinPageUpdate objlinkedinpageupdate = new LinkedinPageUpdate();
            List <LinkedinPageUpdate.CompanyPagePosts> objcompanypagepost = new List <LinkedinPageUpdate.CompanyPagePosts>();

            objcompanypagepost = objlinkedinpageupdate.GetPagePosts(_oauth, PageId);
            return(objcompanypagepost);
        }