Esempio n. 1
0
        public static IQueryable <Trigger> Include(this IQueryable <Trigger> query, NodeInclude include)
        {
            if (include.HasFlag(TriggerInclude.Actions))
            {
                query = query.Include(t => t.Actions);
            }
            if (include.HasFlag(TriggerInclude.Actuators))
            {
                query = query.Include(t => t.Actions.Select(a => a.Actuators));
            }
            if (include.HasFlag(TriggerInclude.ActuatorsNode))
            {
                query = query.Include(t => t.Actions.Select(a => a.Actuators.Select(p => p.Node)));
            }

            if (include.HasFlag(TriggerInclude.Sensors))
            {
                query = query.Include(t => t.Sensors);
            }
            if (include.HasFlag(TriggerInclude.SensorsNode))
            {
                query = query.Include(t => t.Sensors.Select(a => a.Node));
            }
            return(query);
        }
 public static IQueryable<Node> Include(this IQueryable<Node> query, NodeInclude include)
 {
     if (include.HasFlag (NodeInclude.Config))
         query = query.Include (_ => _.Configuration);
     if (include.HasFlag (NodeInclude.Ports))
         query = query.Include (_ => _.Ports);
     if (include.HasFlag (NodeInclude.LatestValues))
         query = query.Include (_ => _.LatestValues);
     return query;
 }
 public static IQueryable <Node> Include(this IQueryable <Node> query, NodeInclude include)
 {
     if (include.HasFlag(NodeInclude.Config))
     {
         query = query.Include(_ => _.Configuration);
     }
     if (include.HasFlag(NodeInclude.Ports))
     {
         query = query.Include(_ => _.Ports);
     }
     if (include.HasFlag(NodeInclude.LatestValues))
     {
         query = query.Include(_ => _.LatestValues);
     }
     return(query);
 }
Esempio n. 4
0
 public static IQueryable <Node> Include(this IQueryable <Node> query, NodeInclude include)
 {
     if (include.HasFlag(NodeInclude.Metadata))
     {
         query = query.Include(x => x.Metadata);
     }
     if (include.HasFlag(NodeInclude.Ports))
     {
         query = query.Include(x => x.Ports);
     }
     if (include.HasFlag(NodeInclude.AggregatedData))
     {
         query = query.Include(x => x.AggregatedData);
     }
     return(query);
 }
 public static IQueryable <Trigger> Include(this IQueryable <Trigger> query, NodeInclude include)
 {
     if (include.HasFlag(TriggerInclude.Actions))
     {
         query = query.Include(t => t.Actions);
     }
     return(query);
 }