示例#1
0
        /// <summary>
        /// Converts this instance of <see cref="agreements"/> to an instance of <see cref="agreementsDTO"/>.
        /// </summary>
        /// <param name="entity"><see cref="agreements"/> to convert.</param>
        public static agreementsDTO ToDTO(this agreements entity)
        {
            if (entity == null)
            {
                return(null);
            }

            var dto = new agreementsDTO();

            dto.id_act              = entity.id_act;
            dto.name                = entity.name;
            dto.description         = entity.description;
            dto.id_user_responsible = entity.id_user_responsible;

            entity.OnDTO(dto);

            return(dto);
        }
示例#2
0
        /// <summary>
        /// Converts this instance of <see cref="agreementsDTO"/> to an instance of <see cref="agreements"/>.
        /// </summary>
        /// <param name="dto"><see cref="agreementsDTO"/> to convert.</param>
        public static agreements ToEntity(this agreementsDTO dto)
        {
            if (dto == null)
            {
                return(null);
            }

            var entity = new agreements();

            entity.id_act              = dto.id_act;
            entity.name                = dto.name;
            entity.description         = dto.description;
            entity.id_user_responsible = dto.id_user_responsible;

            dto.OnEntity(entity);

            return(entity);
        }
示例#3
0
 /// <summary>
 /// Invoked when <see cref="ToEntity"/> operation is about to return.
 /// </summary>
 /// <param name="entity"><see cref="agreements"/> converted from <see cref="agreementsDTO"/>.</param>
 static partial void OnEntity(this agreementsDTO dto, agreements entity);
示例#4
0
 /// <summary>
 /// Invoked when <see cref="ToDTO"/> operation is about to return.
 /// </summary>
 /// <param name="dto"><see cref="agreementsDTO"/> converted from <see cref="agreements"/>.</param>
 static partial void OnDTO(this agreements entity, agreementsDTO dto);