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

            var dto = new testcorrunceDto();

            dto.TestConcurrenceId = entity.TestConcurrenceId;
            dto.Value             = entity.Value;

            entity.OnDTO(dto);

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

            var entity = new testcorrunce();

            entity.TestConcurrenceId = dto.TestConcurrenceId;
            entity.Value             = dto.Value;

            dto.OnEntity(entity);

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