public List <tbl_Content> GetContentByCategoryUrl(string url, int domainID) { tbl_Categories category = CategoriesRepository.GetByURL(url); if (category == null) { return(null); } var sitemaps = SitemapRepository.GetByCategoryID(category.CategoryID, domainID).Where(c => c.SM_Live).OrderByDescending(b => b.SM_Date); if (sitemaps == null || sitemaps.Count() == 0) { return(null); } return(sitemaps.Select(s => s.tbl_Content.Where(c => c.C_Approved && !c.C_Deleted).OrderByDescending(c => c.C_ModificationDate).FirstOrDefault()).Where(b => b != null).ToList()); }
public List <tbl_SiteMap> GetSitemapByCategoryID(int categoryID, int domainID) { return(SitemapRepository.GetByCategoryID(categoryID, domainID).ToList()); }