예제 #1
0
        public override string ToString()
        {
            CategoryService cats = new CategoryService();
            List<CategoryGroup> catg = cats.GetCategories();
            Category.Category cat = catg.Where(p => p.Categories.Count(q => q.Id == CategoryId) > 0).Select(p=>p.Categories.Where(q=>q.Id==CategoryId).First()).First();
            StringBuilder s = new StringBuilder();

            s.Append(User);
            s.AppendLine();
            s.Append(Location);
            s.AppendLine();
            s.AppendLine(cat.Name);
            s.Append(Parameters);
            s.AppendLine(Title);
            s.AppendLine(Body);
            s.Append(Price);

            return s.ToString();
        }
예제 #2
0
파일: Avito.cs 프로젝트: unstope/Avito
		public List<CategoryGroup> GetCat()
		{
			if (catg == null)
			{
				CategoryService cats = new CategoryService();
				catg = cats.GetCategories();
			}
			return catg;
		}