using System.Collections.Generic; using System.Linq; namespace ET { public partial class CropConfigCategory { public List GetAllSeasonCrop(int season) { List result = new List(); foreach(var item in CropConfigCategory.Instance.GetAll().Values) { var s = item.Season.ToList(); if (s.Contains(season)) { result.Add(item.Id); } } return result; } } }