/// <summary> /// Converts this instance of <see cref="noxioushabits"/> to an instance of <see cref="noxioushabitsDto"/>. /// </summary> /// <param name="entity"><see cref="noxioushabits"/> to convert.</param> public static noxioushabitsDto ToDTO(this noxioushabits entity) { if (entity == null) { return(null); } var dto = new noxioushabitsDto(); dto.v_NoxiousHabitsId = entity.v_NoxiousHabitsId; dto.v_PersonId = entity.v_PersonId; dto.i_TypeHabitsId = entity.i_TypeHabitsId; dto.v_Frequency = entity.v_Frequency; dto.v_Comment = entity.v_Comment; dto.v_DescriptionHabit = entity.v_DescriptionHabit; dto.v_DescriptionQuantity = entity.v_DescriptionQuantity; 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; dto.v_ComentaryUpdate = entity.v_ComentaryUpdate; entity.OnDTO(dto); return(dto); }
/// <summary> /// Converts this instance of <see cref="noxioushabitsDto"/> to an instance of <see cref="noxioushabits"/>. /// </summary> /// <param name="dto"><see cref="noxioushabitsDto"/> to convert.</param> public static noxioushabits ToEntity(this noxioushabitsDto dto) { if (dto == null) { return(null); } var entity = new noxioushabits(); entity.v_NoxiousHabitsId = dto.v_NoxiousHabitsId; entity.v_PersonId = dto.v_PersonId; entity.i_TypeHabitsId = dto.i_TypeHabitsId; entity.v_Frequency = dto.v_Frequency; entity.v_Comment = dto.v_Comment; entity.v_DescriptionHabit = dto.v_DescriptionHabit; entity.v_DescriptionQuantity = dto.v_DescriptionQuantity; 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; entity.v_ComentaryUpdate = dto.v_ComentaryUpdate; dto.OnEntity(entity); return(entity); }
/// <summary> /// Invoked when <see cref="ToEntity"/> operation is about to return. /// </summary> /// <param name="entity"><see cref="noxioushabits"/> converted from <see cref="noxioushabitsDto"/>.</param> static partial void OnEntity(this noxioushabitsDto dto, noxioushabits entity);
/// <summary> /// Invoked when <see cref="ToDTO"/> operation is about to return. /// </summary> /// <param name="dto"><see cref="noxioushabitsDto"/> converted from <see cref="noxioushabits"/>.</param> static partial void OnDTO(this noxioushabits entity, noxioushabitsDto dto);