/// <summary> /// Converts this instance of <see cref="forumSubcategoryDTO"/> to an instance of <see cref="forumSubcategory"/>. /// </summary> /// <param name="dto"><see cref="forumSubcategoryDTO"/> to convert.</param> public static forumSubcategory ToEntity(this forumSubcategoryDTO dto) { if (dto == null) return null; var entity = new forumSubcategory(); entity.idSubcategory = dto.idSubcategory; entity.idCategory = dto.idCategory; entity.title = dto.title; entity.description = dto.description; entity.date = dto.date; 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="forumSubcategory"/> converted from <see cref="forumSubcategoryDTO"/>.</param> partial static void OnEntity(this forumSubcategoryDTO dto, forumSubcategory entity);