/// <summary> /// Converts this instance of <see cref="CampusStation"/> to an instance of <see cref="CampusStationDTO"/>. /// </summary> /// <param name="entity"><see cref="CampusStation"/> to convert.</param> public static CampusStationDTO ToDTO(this CampusStation entity) { if (entity == null) { return(null); } var dto = new CampusStationDTO(); dto.CampusID = entity.CampusID; dto.StationID = entity.StationID; dto.CreatedByUserID = entity.CreatedByUserID; dto.CreatedDate = entity.CreatedDate; dto.ModifiedByUserID = entity.ModifiedByUserID; dto.ModifiedDate = entity.ModifiedDate; entity.OnDTO(dto); return(dto); }
/// <summary> /// Converts this instance of <see cref="CampusStationDTO"/> to an instance of <see cref="CampusStation"/>. /// </summary> /// <param name="dto"><see cref="CampusStationDTO"/> to convert.</param> public static CampusStation ToEntity(this CampusStationDTO dto) { if (dto == null) { return(null); } var entity = new CampusStation(); entity.CampusID = dto.CampusID; entity.StationID = dto.StationID; entity.CreatedByUserID = dto.CreatedByUserID; entity.CreatedDate = dto.CreatedDate; 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="CampusStation"/> converted from <see cref="CampusStationDTO"/>.</param> static partial void OnEntity(this CampusStationDTO dto, CampusStation entity);
/// <summary> /// Invoked when <see cref="ToDTO"/> operation is about to return. /// </summary> /// <param name="dto"><see cref="CampusStationDTO"/> converted from <see cref="CampusStation"/>.</param> static partial void OnDTO(this CampusStation entity, CampusStationDTO dto);