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

Related Questions

I have a collection containing a LOT of Data Transfer Objects that I need
I have Class and Student objects. Both have collection of another as property. Which
I have a collection that use as a cache. How can I limit the
I have a domain object that has an attribute which is a collection containing
I have a class that adapts std::vector to model a container of domain-specific objects.
We have a sizable collection of applications (>50) all running under a single domain
Lets say I have collection of documents with specified longitude and latitude. type is
for example I have collection foo of documents like that: {tag_cloud:[{value:games, count:10}, {value:girls, count:500}]}
We have a collection of entities of type called Unit , collection of entities
I have a collection of Objective-C classes that get sub-classed at a variety of

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.