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

            var dto = new actsDTO();

            dto.id_act            = entity.id_act;
            dto.name_act          = entity.name_act;
            dto.create_date       = entity.create_date;
            dto.status            = entity.status;
            dto.description_small = entity.description_small;
            dto.description_large = entity.description_large;
            dto.id_user_create    = entity.id_user_create;

            entity.OnDTO(dto);

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

            var entity = new acts();

            entity.id_act            = dto.id_act;
            entity.name_act          = dto.name_act;
            entity.create_date       = dto.create_date;
            entity.status            = dto.status;
            entity.description_small = dto.description_small;
            entity.description_large = dto.description_large;
            entity.id_user_create    = dto.id_user_create;

            dto.OnEntity(entity);

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