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