public static List<RatingsIndexModel> GetModels(object cell) { List<RatingsIndexModel> ret = new List<RatingsIndexModel>(); using (var ctx = new Entities()) { int parent = ctx.GetCellID(cell); var list = ctx.GetRatingsIndex(parent).ToList(); list.ForEach(i => ret.Add(new RatingsIndexModel(i))); } return ret; }