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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T22:45:57+00:00 2026-06-05T22:45:57+00:00

My app in ASP.NET C#, i use linq to sql to pass data from

  • 0

My app in ASP.NET C#, i use linq to sql to pass data from database. My code below

Linq to sql:

Figure

My code :

    public class course_list
        {
            //Id of event            
            public int id { get; set; }
            // Name of event
            public string name { get; set; }
            //type of event
            public string e_type { get; set; }
            //name of the compay
            public string compay { get; set; }
        }
        // Get data
        protected void show_event()
        {
            for_testDataContext db = new for_testDataContext();
            IQueryable<course_list> CourseList = from cl in db.events
                                                select new course_list()
                                                {
                                                    id = cl.id,
                                                    name = cl.name,
                                                    e_type = cl.e_type_id, // how to get name of e_type
                                                    compay = cl.company_id //How to get name of company
                                                };

        }

How to assign e_type = name of e_type match cl.e_type_id and company = name of compay match cl.company_id

  • 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-05T22:45:59+00:00Added an answer on June 5, 2026 at 10:45 pm
    select new course_list
    {
      id = cl.id,
      name = cl.name,
      e_type = cl.e_type.name,
      company = cl.company.name
    };
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My app in ASP.NET C#. I use Linq to Sql, look the picuture //
We're creating a new consumer/public-facing ASP.Net web app. There are two concerns: --Use cookie
I have an ASP.NET web app where I use an ado sql connection to
I have an asp.net web app which holds its data in an sql server
I have a web app (ASP.NET 2.0 C#)where I get data from an Oracle
Trying to use use SharpSVN in an ASP.NET app. So far, it's been nothing
I´m building an asp.net app, which technology I should use to get AJAX capabilities?
We use ELMAH for our ASP.NET web app and I am stumped as to
In my Controller in a Asp.net MVC 1 app I want to use UpdateModel
I currently use the repository pattern in my ASP.NET MVC 3 app. I use

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.