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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T03:42:25+00:00 2026-05-21T03:42:25+00:00

Sooo basically I have a table called Comment. On that table I have three

  • 0

Sooo basically I have a table called Comment. On that table I have three fields,

  • ID
  • Title
  • Text

I’ve created an Entity object for the table already and it maps all three fields, but what I want now is another Entity called CommentHeader that will map only ID and Title. I want to only load the titles of all the comments and not the text for speed reasons. So what’s the best way for going about this?

I’m not looking for a Select statement with a var object. I can figure that one out on my own and I really don’t like that solution because I’d much rather abstract it behind an Entity object.

I’ve tried the obvious solution, which was to just copy the original Entity object and delete Text from it. That resulted in an error because only one Entity can map to one table without conditions. It sounds to me like I have no choice but to use a Select statement. I just wanted to make sure before I did something stupid.

(By the way this example only has three fields for simplicity’s sake. Assume that the header could have considerably more fields in it. This is the primary reason I don’t want to just use a select with a var object, because it’s not just one field but could be a whole bunch of fields).

  • 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-05-21T03:42:26+00:00Added an answer on May 21, 2026 at 3:42 am

    The easiest way probably would be to create a view (“CommentHeaders”) in the database that only selects ID and title from the Comment table. Then update your model and add the view, which will create a new entity based on those columns.

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

Sidebar

Related Questions

I have tried so many things but I don't understand this sooo confusing. I
I am trying to do as my question states, sooo I have the following
Sooo...it's only sort of programming related, but I figure it's election day, right? Is
is it possible to dynamically set the datacontract's datamember attributes during runtime? Basically what
Sooo I started taking my second computer science class ever! For my first class
Sooo I'm having an issue with my function. static int syracuse(int x){ if (x%2==0){
I'm sooo close... but I don't quite see the connection from the upload view
I got used so much to this in notepad++ that when i switched to
Hey i have a div moving via a jquery animation and i am trying
Okay, I've seen but haven't programmed in C# before. You can assume I'm competent

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.