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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T10:58:30+00:00 2026-05-23T10:58:30+00:00

Oftentimes I need to return a list of two or three columns from a

  • 0

Oftentimes I need to return a list of two or three columns from a stored proc in the data layer. I usually use entities to push data back to the business/UI layer. However, I don’t want to create an entity for something that is not really an entity.

Lets say I have to return a set of “date, string, string”, is there any other way to do this.. for two columns, i can perhaps get away with a dictionary. I always end up creating a dummy entity but thought I’ll ask this 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. Editorial Team
    Editorial Team
    2026-05-23T10:58:31+00:00Added an answer on May 23, 2026 at 10:58 am

    Create a new model to store the data:

    public class ResultModel
    {
        public DateTime DateTime1 { get; set; }
        public string String1 { get; set; }
        public string String1 { get; set; }
    }
    

    then just store your data into this like so:

    IEnumerable<ResultModel> results =
        Entities.Table.Select(r => new ResultModel
        {
            DateTime1 = r.DateTime,
            String1 = r.String1,
            String2 = r.String2
        });
    

    Not verified the code but is a guide as to how to achieve this.

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

Sidebar

Related Questions

Oftentimes a developer will be faced with a choice between two possible ways to
Oftentimes data structures' valid initialization is to set all members to zero. Even when
I often times have the need to import 3D points (x,y,z data) into the
I am Developing an windows Application, oftentimes I need to clear the Textboxes whenever
Often times it seems I have a list of items, and I need to
Often times I need a collection of non-sequential objects with numeric identifiers. I like
So sometimes (oftentimes!) you want to target a specific .NET version (say 3.0), but
When writing a T-SQL script that I plan on re-running, often times I use
I am working with Spring MVC 2.5. Oftentimes, I am only using one form
I am compiling packages and I see that oftentimes Makefile authors write set CFLAGS

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.