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