/// <summary> /// Converts this instance of <see cref="forumVote"/> to an instance of <see cref="forumVoteDTO"/>. /// </summary> /// <param name="entity"><see cref="forumVote"/> to convert.</param> public static forumVoteDTO ToDTO(this forumVote entity) { if (entity == null) return null; var dto = new forumVoteDTO(); dto.idVote = entity.idVote; dto.idForumPost = entity.idForumPost; dto.idPerson = entity.idPerson; dto.date = entity.date; dto.comment = entity.comment; dto.ip = entity.ip; entity.OnDTO(dto); return dto; }
/// <summary> /// Invoked when <see cref="ToDTO"/> operation is about to return. /// </summary> /// <param name="dto"><see cref="forumVoteDTO"/> converted from <see cref="forumVote"/>.</param> partial static void OnDTO(this forumVote entity, forumVoteDTO dto);