Beispiel #1
0
        public Dictionary <int, List <Mst_slotitem_remodel_detail> > Get_Mst_slotitem_remodel_detail()
        {
            IEnumerable <XElement> enumerable = Utils.Xml_Result(Mst_slotitem_remodel_detail.tableName, Mst_slotitem_remodel_detail.tableName, string.Empty);

            if (enumerable == null)
            {
                return(null);
            }
            List <Mst_slotitem_remodel_detail> list = new List <Mst_slotitem_remodel_detail>();

            foreach (XElement item in enumerable)
            {
                Mst_slotitem_remodel_detail instance = null;
                Model_Base.SetMaster(out instance, item);
                list.Add(instance);
            }
            return(list.ToLookup((Mst_slotitem_remodel_detail x) => x.Id).ToDictionary((IGrouping <int, Mst_slotitem_remodel_detail> g_id) => g_id.Key, (IGrouping <int, Mst_slotitem_remodel_detail> values) => values.ToList()));
        }
        public Dictionary <int, List <Mst_slotitem_remodel_detail> > Get_Mst_slotitem_remodel_detail()
        {
            IEnumerable <XElement> enumerable = Utils.Xml_Result(Mst_slotitem_remodel_detail.tableName, Mst_slotitem_remodel_detail.tableName, string.Empty);

            if (enumerable == null)
            {
                return(null);
            }
            List <Mst_slotitem_remodel_detail> list = new List <Mst_slotitem_remodel_detail>();

            using (IEnumerator <XElement> enumerator = enumerable.GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    XElement current = enumerator.get_Current();
                    Mst_slotitem_remodel_detail mst_slotitem_remodel_detail = null;
                    Model_Base.SetMaster <Mst_slotitem_remodel_detail>(out mst_slotitem_remodel_detail, current);
                    list.Add(mst_slotitem_remodel_detail);
                }
            }
            return(Enumerable.ToDictionary <IGrouping <int, Mst_slotitem_remodel_detail>, int, List <Mst_slotitem_remodel_detail> >(Enumerable.ToLookup <Mst_slotitem_remodel_detail, int>(list, (Mst_slotitem_remodel_detail x) => x.Id), (IGrouping <int, Mst_slotitem_remodel_detail> g_id) => g_id.get_Key(), (IGrouping <int, Mst_slotitem_remodel_detail> values) => Enumerable.ToList <Mst_slotitem_remodel_detail>(values)));
        }