Example #1
0
 public static void ToEntity(DT.SlaveGroup source, DB.SlaveGroup target)
 {
     if ((source != null) && (target != null))
     {
         target.ResourceId = source.Id; target.Name = source.Name; target.ParentResourceId = source.ParentResourceId; target.HbInterval = source.HbInterval; target.OwnerUserId = source.OwnerUserId;
     }
 }
Example #2
0
        public static DB.SlaveGroup ToEntity(DT.SlaveGroup source)
        {
            if (source == null)
            {
                return(null);
            }
            var entity = new DB.SlaveGroup(); ToEntity(source, entity);

            return(entity);
        }
Example #3
0
 public static DT.SlaveGroup ToDto(DB.SlaveGroup source)
 {
     if (source == null)
     {
         return(null);
     }
     return(new DT.SlaveGroup {
         Id = source.ResourceId, Name = source.Name, ParentResourceId = source.ParentResourceId, HbInterval = source.HbInterval, OwnerUserId = source.OwnerUserId
     });
 }
Example #4
0
        public static DA.SlaveGroup ToEntity(this DT.SlaveGroup source)
        {
            if (source == null)
            {
                return(null);
            }
            var result = new DA.SlaveGroup();

            source.CopyToEntity(result);
            return(result);
        }
Example #5
0
 public static void CopyToEntity(this DT.SlaveGroup source, DA.SlaveGroup target)
 {
     if ((source == null) || (target == null))
     {
         return;
     }
     target.ResourceId       = source.Id;
     target.Name             = source.Name;
     target.ParentResourceId = source.ParentResourceId;
     target.HbInterval       = source.HbInterval;
     target.OwnerUserId      = source.OwnerUserId;
 }
Example #6
0
 public static DB.SlaveGroup ToEntity(DT.SlaveGroup source) {
   if (source == null) return null;
   var entity = new DB.SlaveGroup(); ToEntity(source, entity);
   return entity;
 }
Example #7
0
 public static DA.SlaveGroup ToEntity(this DT.SlaveGroup source) {
   if (source == null) return null;
   var result = new DA.SlaveGroup();
   source.CopyToEntity(result);
   return result;
 }
Example #8
0
 public static void ToEntity(DT.SlaveGroup source, SlaveGroup target) {
   if ((source != null) && (target != null)) {
     target.ResourceId = source.Id; target.Name = source.Name; target.ParentResourceId = source.ParentResourceId;
   }
 }
Example #9
0
 public static DT.SlaveGroup ToDto(SlaveGroup source) {
   if (source == null) return null;
   return new DT.SlaveGroup { Id = source.ResourceId, Name = source.Name, ParentResourceId = source.ParentResourceId };
 }