示例#1
0
        public PollingGroupProps getPollingGroupProps(int id)
        {
            var    sel1     = context.Properties.AsNoTracking().Where(c => c.ObjectId == id && c.PropId == 0).FirstOrDefault();
            var    sel2     = context.Objects.Find(id);
            var    Props    = new PollingGroupProps();
            string JSONprop = sel1.Value;
            var    propsDes = json.Deserialize(JSONprop, Props.GetType());

            Props      = (PollingGroupProps)propsDes;
            Props.Id   = id;
            Props.Name = sel2.Name;
            return(Props);
        }