/// <summary>
        /// Converts this instance of <see cref="componentfieldvaluesrestriction"/> to an instance of <see cref="componentfieldvaluesrestrictionDto"/>.
        /// </summary>
        /// <param name="entity"><see cref="componentfieldvaluesrestriction"/> to convert.</param>
        public static componentfieldvaluesrestrictionDto ToDTO(this componentfieldvaluesrestriction entity)
        {
            if (entity == null)
            {
                return(null);
            }

            var dto = new componentfieldvaluesrestrictionDto();

            dto.v_ComponentFieldValuesRestrictionId  = entity.v_ComponentFieldValuesRestrictionId;
            dto.v_ComponentFieldValuesId             = entity.v_ComponentFieldValuesId;
            dto.v_MasterRecommendationRestricctionId = entity.v_MasterRecommendationRestricctionId;
            dto.i_IsDeleted    = entity.i_IsDeleted;
            dto.i_InsertUserId = entity.i_InsertUserId;
            dto.d_InsertDate   = entity.d_InsertDate;
            dto.i_UpdateUserId = entity.i_UpdateUserId;
            dto.d_UpdateDate   = entity.d_UpdateDate;

            entity.OnDTO(dto);

            return(dto);
        }
        /// <summary>
        /// Converts this instance of <see cref="componentfieldvaluesrestrictionDto"/> to an instance of <see cref="componentfieldvaluesrestriction"/>.
        /// </summary>
        /// <param name="dto"><see cref="componentfieldvaluesrestrictionDto"/> to convert.</param>
        public static componentfieldvaluesrestriction ToEntity(this componentfieldvaluesrestrictionDto dto)
        {
            if (dto == null)
            {
                return(null);
            }

            var entity = new componentfieldvaluesrestriction();

            entity.v_ComponentFieldValuesRestrictionId  = dto.v_ComponentFieldValuesRestrictionId;
            entity.v_ComponentFieldValuesId             = dto.v_ComponentFieldValuesId;
            entity.v_MasterRecommendationRestricctionId = dto.v_MasterRecommendationRestricctionId;
            entity.i_IsDeleted    = dto.i_IsDeleted;
            entity.i_InsertUserId = dto.i_InsertUserId;
            entity.d_InsertDate   = dto.d_InsertDate;
            entity.i_UpdateUserId = dto.i_UpdateUserId;
            entity.d_UpdateDate   = dto.d_UpdateDate;

            dto.OnEntity(entity);

            return(entity);
        }
 /// <summary>
 /// Invoked when <see cref="ToEntity"/> operation is about to return.
 /// </summary>
 /// <param name="entity"><see cref="componentfieldvaluesrestriction"/> converted from <see cref="componentfieldvaluesrestrictionDto"/>.</param>
 static partial void OnEntity(this componentfieldvaluesrestrictionDto dto, componentfieldvaluesrestriction entity);
 /// <summary>
 /// Invoked when <see cref="ToDTO"/> operation is about to return.
 /// </summary>
 /// <param name="dto"><see cref="componentfieldvaluesrestrictionDto"/> converted from <see cref="componentfieldvaluesrestriction"/>.</param>
 static partial void OnDTO(this componentfieldvaluesrestriction entity, componentfieldvaluesrestrictionDto dto);