Ejemplo n.º 1
0
        /// <summary>
        /// Converts this instance of <see cref="restriction"/> to an instance of <see cref="restrictionDto"/>.
        /// </summary>
        /// <param name="entity"><see cref="restriction"/> to convert.</param>
        public static restrictionDto ToDTO(this restriction entity)
        {
            if (entity == null)
            {
                return(null);
            }

            var dto = new restrictionDto();

            dto.v_RestrictionId          = entity.v_RestrictionId;
            dto.v_DiagnosticRepositoryId = entity.v_DiagnosticRepositoryId;
            dto.v_ServiceId            = entity.v_ServiceId;
            dto.v_ComponentId          = entity.v_ComponentId;
            dto.v_MasterRestrictionId  = entity.v_MasterRestrictionId;
            dto.d_StartDateRestriction = entity.d_StartDateRestriction;
            dto.d_EndDateRestriction   = entity.d_EndDateRestriction;
            dto.i_IsDeleted            = entity.i_IsDeleted;
            dto.i_InsertUserId         = entity.i_InsertUserId;
            dto.d_InsertDate           = entity.d_InsertDate;
            dto.d_UpdateDate           = entity.d_UpdateDate;
            dto.i_UpdateUserId         = entity.i_UpdateUserId;
            dto.v_ComentaryUpdate      = entity.v_ComentaryUpdate;

            entity.OnDTO(dto);

            return(dto);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Converts this instance of <see cref="restrictionDto"/> to an instance of <see cref="restriction"/>.
        /// </summary>
        /// <param name="dto"><see cref="restrictionDto"/> to convert.</param>
        public static restriction ToEntity(this restrictionDto dto)
        {
            if (dto == null)
            {
                return(null);
            }

            var entity = new restriction();

            entity.v_RestrictionId          = dto.v_RestrictionId;
            entity.v_DiagnosticRepositoryId = dto.v_DiagnosticRepositoryId;
            entity.v_ServiceId            = dto.v_ServiceId;
            entity.v_ComponentId          = dto.v_ComponentId;
            entity.v_MasterRestrictionId  = dto.v_MasterRestrictionId;
            entity.d_StartDateRestriction = dto.d_StartDateRestriction;
            entity.d_EndDateRestriction   = dto.d_EndDateRestriction;
            entity.i_IsDeleted            = dto.i_IsDeleted;
            entity.i_InsertUserId         = dto.i_InsertUserId;
            entity.d_InsertDate           = dto.d_InsertDate;
            entity.d_UpdateDate           = dto.d_UpdateDate;
            entity.i_UpdateUserId         = dto.i_UpdateUserId;
            entity.v_ComentaryUpdate      = dto.v_ComentaryUpdate;

            dto.OnEntity(entity);

            return(entity);
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Invoked when <see cref="ToEntity"/> operation is about to return.
 /// </summary>
 /// <param name="entity"><see cref="restriction"/> converted from <see cref="restrictionDto"/>.</param>
 static partial void OnEntity(this restrictionDto dto, restriction entity);
Ejemplo n.º 4
0
 /// <summary>
 /// Invoked when <see cref="ToDTO"/> operation is about to return.
 /// </summary>
 /// <param name="dto"><see cref="restrictionDto"/> converted from <see cref="restriction"/>.</param>
 static partial void OnDTO(this restriction entity, restrictionDto dto);