Beispiel #1
0
        public List <InstanceContent> GetListSyncFromDB(List <InstanceContent> _Entities)
        {
            List <InstanceContent> UpdatedList = (from Cont in _Entities
                                                  select new InstanceContent()
            {
                InstanceContentID = GetID(Cont.Instance.Name, Cont.Attribute.Name),
                Instance = Instances.GetSyncFromDB(Cont.Instance),
                InstanceID = Instances.GetID(Cont.Instance.Name),
                Attribute = Attributes.GetSyncFromDB(Cont.Attribute),
                AttributeID = Attributes.GetID(Cont.Attribute.Name),
                PLCTag = Cont.PLCTag != null ? PLCTags.GetSyncFromDB(Cont.PLCTag) : null,
                PLCTagID = Cont.PLCTag != null ? PLCTags.GetID(Cont.PLCTag.Name) : Cont.PLCTagID,
                IOTag = IOTags.GetSyncFromDB(Cont.IOTag),
                IOTagID = IOTags.GetID(Cont.IOTag.Name),
                AssetName = Cont.AssetName
            }).ToList();

            return(UpdatedList);
        }