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 8478473
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T18:45:20+00:00 2026-06-10T18:45:20+00:00

I have the following problem I’m not sure how to address. I need to

  • 0

I have the following problem I’m not sure how to address.

I need to paginate two groups of items (ex Cars and Motorcycles). I need a single list sorted alphabetically, which when clicked is directed to a information page for the item. This is shown in groups of 10 with a back/next button.

My actual classes have very different sets of properties. I don’t want to have a single class for both cars and motorcycles.

Both items have an Id, Name, and Description property, but then the remaining properties are unique (whether it’s a Car or Motorcycle item).

What is the best way to group the two lists, sort alphabetically, and then pick the desired items (such as items 11-20 from the merged list)? Right now I am converting all items to a DisplayItem class by doing the following (which works) but is not ideal for large groups of items.

IEnumerable<DisplayItem> entities = cars.Select(b => new DisplayItem(b)).Union(motorcycles.Select(a => new DisplayItem(a))).Skip(10).Take(10);

What would be the correct way to do this?

Thanks!

  • 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-10T18:45:22+00:00Added an answer on June 10, 2026 at 6:45 pm

    You could create an interface that both classes implement that contains the sortable property:

    interface ISortableItem
    {
      string Name { get; }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have following problem: I have to make a ASP.NET Webapplication with a two-row
Hi i have following Problem. I write a Mediawiki Extension where i need some
I have following problem. I worked two days on a solution but I cannot
We have following problem. Developers frequently need to make small changes to our web
I have the following problem, which seems not to have a nice solution. For
I have following problem: I need to create an NSMutabeArray with every weekday after
I have following problem: I want to determine between two types without actually evaluating
I have following problem: I have built a tabbar application with 4 tabs. I
I have following problem, Code: String a=Yeahh, I have no a idea what's happening
I am using GWT/JAVA for development. I have following problem: I want to remove

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.