/// <summary> /// Converts this instance of <see cref="CompanyHistory"/> to an instance of <see cref="CompanyHistoryDTO"/>. /// </summary> /// <param name="entity"><see cref="CompanyHistory"/> to convert.</param> public static CompanyHistoryDTO ToDTO(this CompanyHistory entity) { if (entity == null) { return(null); } var dto = new CompanyHistoryDTO(); dto.ID = entity.ID; dto.CompanyID = entity.CompanyID; dto.Name = entity.Name; dto.ModifiedByUserID = entity.ModifiedByUserID; dto.ModifiedDate = entity.ModifiedDate; entity.OnDTO(dto); return(dto); }
/// <summary> /// Converts this instance of <see cref="CompanyHistoryDTO"/> to an instance of <see cref="CompanyHistory"/>. /// </summary> /// <param name="dto"><see cref="CompanyHistoryDTO"/> to convert.</param> public static CompanyHistory ToEntity(this CompanyHistoryDTO dto) { if (dto == null) { return(null); } var entity = new CompanyHistory(); entity.ID = dto.ID; entity.CompanyID = dto.CompanyID; entity.Name = dto.Name; entity.ModifiedByUserID = dto.ModifiedByUserID; entity.ModifiedDate = dto.ModifiedDate; dto.OnEntity(entity); return(entity); }
/// <summary> /// Invoked when <see cref="ToEntity"/> operation is about to return. /// </summary> /// <param name="entity"><see cref="CompanyHistory"/> converted from <see cref="CompanyHistoryDTO"/>.</param> static partial void OnEntity(this CompanyHistoryDTO dto, CompanyHistory entity);
/// <summary> /// Invoked when <see cref="ToDTO"/> operation is about to return. /// </summary> /// <param name="dto"><see cref="CompanyHistoryDTO"/> converted from <see cref="CompanyHistory"/>.</param> static partial void OnDTO(this CompanyHistory entity, CompanyHistoryDTO dto);