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

            var dto = new planvigilanciaDto();

            dto.v_PlanVigilanciaId = entity.v_PlanVigilanciaId;
            dto.v_Name             = entity.v_Name;
            dto.v_Description      = entity.v_Description;
            dto.v_OrganizationId   = entity.v_OrganizationId;
            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);
        }
コード例 #2
0
        /// <summary>
        /// Converts this instance of <see cref="planvigilanciaDto"/> to an instance of <see cref="planvigilancia"/>.
        /// </summary>
        /// <param name="dto"><see cref="planvigilanciaDto"/> to convert.</param>
        public static planvigilancia ToEntity(this planvigilanciaDto dto)
        {
            if (dto == null)
            {
                return(null);
            }

            var entity = new planvigilancia();

            entity.v_PlanVigilanciaId = dto.v_PlanVigilanciaId;
            entity.v_Name             = dto.v_Name;
            entity.v_Description      = dto.v_Description;
            entity.v_OrganizationId   = dto.v_OrganizationId;
            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);
        }
コード例 #3
0
 /// <summary>
 /// Invoked when <see cref="ToEntity"/> operation is about to return.
 /// </summary>
 /// <param name="entity"><see cref="planvigilancia"/> converted from <see cref="planvigilanciaDto"/>.</param>
 static partial void OnEntity(this planvigilanciaDto dto, planvigilancia entity);
コード例 #4
0
 /// <summary>
 /// Invoked when <see cref="ToDTO"/> operation is about to return.
 /// </summary>
 /// <param name="dto"><see cref="planvigilanciaDto"/> converted from <see cref="planvigilancia"/>.</param>
 static partial void OnDTO(this planvigilancia entity, planvigilanciaDto dto);