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