Exemple #1
0
 public forumPostDTO(Int64 idForumPost, Nullable<Int64> idSubcategory, Nullable<Int64> idPerson, Nullable<Int64> parent_post, String title, String content_forum, Nullable<DateTime> date, String ip, List<forumPostDTO> forumPosts1, forumPostDTO forumPost1, forumSubcategoryDTO forumSubcategory, personDTO person, List<forumVoteDTO> forumVotes)
 {
     this.idForumPost = idForumPost;
     this.idSubcategory = idSubcategory;
     this.idPerson = idPerson;
     this.parent_post = parent_post;
     this.title = title;
     this.content_forum = content_forum;
     this.date = date;
     this.ip = ip;
     this.forumPosts1 = forumPosts1;
     this.forumPost1 = forumPost1;
     this.forumSubcategory = forumSubcategory;
     this.person = person;
     this.forumVotes = forumVotes;
 }
        /// <summary>
        /// Converts this instance of <see cref="forumSubcategory"/> to an instance of <see cref="forumSubcategoryDTO"/>.
        /// </summary>
        /// <param name="entity"><see cref="forumSubcategory"/> to convert.</param>
        public static forumSubcategoryDTO ToDTO(this forumSubcategory entity)
        {
            if (entity == null) return null;

            var dto = new forumSubcategoryDTO();

            dto.idSubcategory = entity.idSubcategory;
            dto.idCategory = entity.idCategory;
            dto.title = entity.title;
            dto.description = entity.description;
            dto.date = entity.date;
            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="forumSubcategoryDTO"/> converted from <see cref="forumSubcategory"/>.</param>
partial         static void OnDTO(this forumSubcategory entity, forumSubcategoryDTO dto);