Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 81871
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T21:31:40+00:00 2026-05-10T21:31:40+00:00

I have a collection of domain objects that I need to convert into another

  • 0

I have a collection of domain objects that I need to convert into another type for use by the .NET framework. What is the best practice for doing such a transformation?

Specifically, I have a type called ContentEntry and I need to convert it into a SyndicationItem for use in putting into a SyndicationFeed. The conversion itself is straight forward but I’m looking for a good pattern. Do I create a method on ContentEntry called CreateSyndicationItem() or perhaps a separate converter object? Perhaps an extension method?

This will be somewhat subjective, but I’d appreciate some ideas.

Edit Note: I’d like to note that I don’t control SyndicationItem. It is built into the .NET Framework. Also, I’d really like to convert several ContentEntry objects into SyndicationItems at one time.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T21:31:41+00:00Added an answer on May 10, 2026 at 9:31 pm

    As as cannot modify the SyndicationItem’s constructors, I’d suggest you use the factory pattern. Create a SyndicationItemFactory class that has the method CreateSyndicationItem(). This method returns a SyndicationItem object. In this case, you’ll only need one version of the method, that will take a ContentEntry object.

    When you say you’d like to create multiple ContentEntry objects at once, I’m assuming you have say an array of ContentEntry objects. Another method (say CreateSyndicationItems()) might return an array of SyndicationItems, and take an array of ContentEntry objects as its parameter.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 70k
  • Answers 70k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer If you want to display the next game (including today)… May 11, 2026 at 12:47 pm
  • added an answer Make sure there there are no namespace issues. The fully… May 11, 2026 at 12:47 pm
  • added an answer i in i_tmp2 probably stands for 'integer', i.e. telling you… May 11, 2026 at 12:47 pm

Related Questions

I have a collection of objects to which I'd like to just add a
I have a collection of classes that inherit from an abstract class I created.
I have a collection of non-overlapping rectangles that cover an enclosing rectangle. What is
I have a collection of classes that I want to serialize out to an
I am fairly new to using separate layers for the business logic (Domain) and
I have a scenario in a system which I've tried to simplify as best
I have thus far built an Editor and a Viewer that both work on
I have a List object being accessed by multiple threads. There is mostly one

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.