private BacklinkViewModel GetBackLinkCategory(string alias) { var backlink = new BacklinkViewModel() { Name = SystemVariable.HeadMenu.FirstOrDefault(b => b.Alias == alias).Name.ToString(), Alias = alias }; return(backlink); }
private BacklinkViewModel GetBacklinkForList(string alias) { var category = Commons.SystemVariable.Categorys.FirstOrDefault(p => p.Alias == alias); var backlink = new BacklinkViewModel() { Name = category.Name, Alias = category.Alias }; return(backlink); }
private BacklinkViewModel GetBackLinkPost(string alias) { var cateId = SystemVariable.MenuItem.FirstOrDefault(p => p.Alias == alias).CategoryId.ToString(); var category = SystemVariable.HeadMenu.FirstOrDefault(c => c.Id == int.Parse(cateId)); var backlink = new BacklinkViewModel() { Name = category.Name, Alias = category.Alias }; return(backlink); }
private BacklinkViewModel GetBacklinkForDetail(string alias) { var cateid = Commons.SystemVariable.Posts.FirstOrDefault(p => p.Alias == alias).HeadId; var category = Commons.SystemVariable.Categorys.FirstOrDefault(c => c.Id == cateid); var backlink = new BacklinkViewModel() { Name = category.Name, Alias = category.Alias }; return(backlink); }