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

  • SEARCH
  • Home
  • 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 8850111
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T12:49:26+00:00 2026-06-14T12:49:26+00:00

Understood the concept of translate . Used it in converting a DataModel Type to

  • 0

Understood the concept of translate. Used it in converting a DataModel Type to DTO type for presentation layer like this and worked fine.

objTypeB = objTypeA.TranslateTo<clsTypeB>();

Discrepancy between TypeA and TypeB was just the datatype of few properties and I converted them in the Property Set method.

But in the above implementation if the source is List<TypeA>, I have loop through each to translate to TypeB and add it another List<TypeB> instance. Is it possible to do something like this instead:

Assume resultListA is a List<clsTypeA>

var resultListB = resultListA.TranslateTo<List<clsTypeB>>();

I tried and does not seem to convert. I get a empty resultListB. Any easy approach to this??

  • 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. Editorial Team
    Editorial Team
    2026-06-14T12:49:27+00:00Added an answer on June 14, 2026 at 12:49 pm

    This should do it:

    var resultListB = resultListA.ConvertAll(x => x.TranslateTo<clsTypeB>());
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Sorry for this question, I dont know if i've understood the concept, but SQLite
So far I feel like I've understood the concept and the advantages of OOP
I thought I understood the concept of the JavaScript prototype object, as well as
I just need a confirmation that i have understood the concept of locks in
One thing I have never truly understood is the concept of character encoding. The
I understood how simple route, default route and root routes are used. But I
hello everyone I'm trying to understand how 2-3 trees work, I understood a concept
I can't say i fully understood the concept of threads even i read so
I'm new to programming and IDEs. I never understood the concept of a workspace
i have been using PHP for quite a sometime now, having understood the concept

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.