public HomeLayoutDTO GetLayoutData() { HomeLayoutDTO dto = new HomeLayoutDTO(); dto.Categories = categoryDAO.GetCategoryList(); List <SocialMediaDTO> socialList = new List <SocialMediaDTO>(); socialList = socialDAO.GetSocialMediaData(); dto.Facebook = socialList.First(x => x.Link.Contains("facebook")); dto.Twitter = socialList.First(x => x.Link.Contains("twitter")); dto.Instagram = socialList.First(x => x.Link.Contains("instagram")); dto.YouTube = socialList.First(x => x.Link.Contains("youtube")); dto.LinkedIn = socialList.First(x => x.Link.Contains("linkedin")); FavDTO favDTO = new FavDTO(); dto.Fav = favDAO.GetFav(); List <MetaDTO> metaList = new List <MetaDTO>(); dto.MetaList = metaDAO.GetMetaData(); List <AddressDTO> addressList = addressDAO.GetAddresses(); dto.Address = addressList.First(); dto.hotNews = postDAO.GetHotNews(); return(dto); }
public HomeLayoutDTO GetLayoutData() { HomeLayoutDTO dto = new HomeLayoutDTO(); dto.Categories = categorydao.GetCategories(); List <SocialMediaDTO> socialmedialist = new List <SocialMediaDTO>(); socialmedialist = socialdao.GetSocialMedias(); dto.Facebook = socialmedialist.First(x => x.Link.Contains("facebook")); dto.Twitter = socialmedialist.First(x => x.Link.Contains("twitter")); dto.Instagram = socialmedialist.First(x => x.Link.Contains("instagram")); dto.Youtube = socialmedialist.First(x => x.Link.Contains("youtube")); dto.Linkedin = socialmedialist.First(x => x.Link.Contains("linkedin")); dto.FavDTO = favdao.GetFav(); dto.Metalist = metadao.GetMetaData(); List <AddressDTO> addresslist = addressdao.GetAddresses(); dto.Address = addresslist.First(); dto.HotNews = postdao.GetHotNews(); return(dto); }
public FavDTO GetFav() { return(dao.GetFav()); }