Пример #1
0
        /// <summary>
        /// Converts this instance of <see cref="workgroups"/> to an instance of <see cref="workgroupsDTO"/>.
        /// </summary>
        /// <param name="entity"><see cref="workgroups"/> to convert.</param>
        public static workgroupsDTO ToDTO(this workgroups entity)
        {
            if (entity == null)
            {
                return(null);
            }

            var dto = new workgroupsDTO();

            dto.id_workgroup   = entity.id_workgroup;
            dto.name_workgroup = entity.name_workgroup;
            dto.create_date    = entity.create_date;
            dto.status         = entity.status;
            dto.description    = entity.description;

            entity.OnDTO(dto);

            return(dto);
        }
Пример #2
0
        /// <summary>
        /// Converts this instance of <see cref="workgroupsDTO"/> to an instance of <see cref="workgroups"/>.
        /// </summary>
        /// <param name="dto"><see cref="workgroupsDTO"/> to convert.</param>
        public static workgroups ToEntity(this workgroupsDTO dto)
        {
            if (dto == null)
            {
                return(null);
            }

            var entity = new workgroups();

            entity.id_workgroup   = dto.id_workgroup;
            entity.name_workgroup = dto.name_workgroup;
            entity.create_date    = dto.create_date;
            entity.status         = dto.status;
            entity.description    = dto.description;

            dto.OnEntity(entity);

            return(entity);
        }
Пример #3
0
 /// <summary>
 /// Invoked when <see cref="ToEntity"/> operation is about to return.
 /// </summary>
 /// <param name="entity"><see cref="workgroups"/> converted from <see cref="workgroupsDTO"/>.</param>
 static partial void OnEntity(this workgroupsDTO dto, workgroups entity);
Пример #4
0
 /// <summary>
 /// Invoked when <see cref="ToDTO"/> operation is about to return.
 /// </summary>
 /// <param name="dto"><see cref="workgroupsDTO"/> converted from <see cref="workgroups"/>.</param>
 static partial void OnDTO(this workgroups entity, workgroupsDTO dto);