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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T02:47:40+00:00 2026-05-26T02:47:40+00:00

(I searched a lot and didn’t find an answer yet, maybe it is not

  • 0

(I searched a lot and didn’t find an answer yet, maybe it is not possible at all:/)

Is it possible to create entities in the EDM (from which I generated my DomainService) that are not mapped at all to any DB, just used instead between the DomainService and the Client?
It might sound wierd for those who are entity framework pros:) My goal is to make it possible to return for example only a few properties of an entity instead of the whole entity.
For example I need only the name and birthdate of a user, and I don’t care about the other 10-20 properties. In this case a less complex entity would be perfect, is it possible to make these “lightweight” versions of the entities and use them in the same DomainService?
Or any other suggestions for this kind of simple data querying scenario, using EF on top of the DB?
(Or maybe just don’t care about the bandwith in 2011 and retrieve full entities always? 🙂

Thanks,
Bálint

  • 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-26T02:47:41+00:00Added an answer on May 26, 2026 at 2:47 am

    You can load anonymous types by selecting sevaral properties of your entity like this,

     var studentEnrolments = from s in db.Students
                                      select new { s.FirstMidName,s.Enrollments};
            var studentEnrolmentsList= studentEnrolments.ToList();
            foreach (var studentEnrolment in studentEnrolmentsList)
            {
               //do something here 
            }
    

    http://msdn.microsoft.com/en-us/library/bb738512.aspx

    Edit..

     var studentEnrolments = from s in db.Students
                           select new Student{FirstMidName= s.FirstMidName, Enrollments=s.Enrollments};
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

HI! I have searched a lot, but I didn't find the answer to this
Well I searched a lot, but I didn't find a precise answer how to
I read on here and searched a lot but didn't find the answer, so
I searched a lot but could not find a way to dump table relations
I searched a lot but I can't find an answer. In my contact.php I
I've searched a lot within SO but I can't find the right answer for
I have searched a lot and tried much but I can not find the
I have searched a lot but not able to find particular solution. There are
I searched a lot but I didn't find how to remove the background color
I'm a noob on IOS. I have searched a lot, but I didn't find

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.