Пример #1
0
 public Historian.ChannelGroup ToChannelGroup(ChannelGroup input)
 {
     return(new Historian.ChannelGroup()
     {
         Id = input.Id,
         Name = input.Name
     });
 }
Пример #2
0
        private Entities.ChannelGroup GetDefaultGroup(SqlLoggerContext context)
        {
            var group = context.ChannelGroups.FirstOrDefault(c => c.Name == "General");

            if (group == null)
            {
                group = new Entities.ChannelGroup {
                    Name = "General"
                };
                context.ChannelGroups.Add(group);
                context.SaveChanges();
            }

            return(group);
        }