/// <summary> /// Converts this instance of <see cref="holidays"/> to an instance of <see cref="holidaysDto"/>. /// </summary> /// <param name="entity"><see cref="holidays"/> to convert.</param> public static holidaysDto ToDTO(this holidays entity) { if (entity == null) { return(null); } var dto = new holidaysDto(); dto.v_HolidayId = entity.v_HolidayId; dto.i_Year = entity.i_Year; dto.d_Date = entity.d_Date; dto.v_Reason = entity.v_Reason; dto.i_IsDeleted = entity.i_IsDeleted; entity.OnDTO(dto); return(dto); }
/// <summary> /// Converts this instance of <see cref="holidaysDto"/> to an instance of <see cref="holidays"/>. /// </summary> /// <param name="dto"><see cref="holidaysDto"/> to convert.</param> public static holidays ToEntity(this holidaysDto dto) { if (dto == null) { return(null); } var entity = new holidays(); entity.v_HolidayId = dto.v_HolidayId; entity.i_Year = dto.i_Year; entity.d_Date = dto.d_Date; entity.v_Reason = dto.v_Reason; entity.i_IsDeleted = dto.i_IsDeleted; dto.OnEntity(entity); return(entity); }
/// <summary> /// Invoked when <see cref="ToEntity"/> operation is about to return. /// </summary> /// <param name="entity"><see cref="holidays"/> converted from <see cref="holidaysDto"/>.</param> static partial void OnEntity(this holidaysDto dto, holidays entity);
/// <summary> /// Invoked when <see cref="ToDTO"/> operation is about to return. /// </summary> /// <param name="dto"><see cref="holidaysDto"/> converted from <see cref="holidays"/>.</param> static partial void OnDTO(this holidays entity, holidaysDto dto);