Beispiel #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;
     }
 }
Beispiel #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);
        }
Beispiel #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
     });
 }
Beispiel #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);
        }
Beispiel #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;
 }
Beispiel #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;
 }
Beispiel #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;
 }
Beispiel #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;
   }
 }
Beispiel #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 };
 }