public NewsViewModel() { Initialize(); ArticleItemList = new ArticleItemServices().GetNewsList(); Article_Count = ArticleItemList.Count(); ListType = MapTitle.First().Key.ToString(); }
public NewsViewModel(string subType) { Initialize(); String subTypeId = MapRef.Select(x => x.Value).Where(x => x.CD == subType).First().ID.ToString(); ArticleItemList = String.Equals(subType, MapTitle.First().Key.ToString()) ? new ArticleItemServices().GetNewsList() : new ArticleItemServices().GetNewsList(subTypeId); Article_Count = ArticleItemList.Count(); ListType = subType; }