public override string ToString() { StringBuilder output = new StringBuilder(); string shortId = $"{this._id.ToString().Substring(this._id.ToString().Length - 6)}"; List <TypeCounter> AnimalCount = ( from chicken in Chickens group chicken by chicken.Type into AnimalType select new TypeCounter { Type = AnimalType.Key, Counter = AnimalType.Count() } ).ToList(); output.Append($"Chicken house ( "); foreach (TypeCounter animal in AnimalCount) { output.Append($"{animal.Counter} {animal.Type} "); } output.Append($")\n"); return(output.ToString()); }