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

  • Home
  • SEARCH
  • 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 860209
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T08:46:58+00:00 2026-05-15T08:46:58+00:00

I have Order,OrderDetails and OrderStatus objects as shown below: public class Order { public

  • 0

I have Order,OrderDetails and OrderStatus objects as shown below:

public class Order
{
  public override int OrderId { get; set; }
  public string FName { get; set; }
  public string MName { get; set; }
  public string LName { get; set; }
  public string Street { get; set; }
  public string City { get; set; }
  public List<OrderDetails> OrderDetails { get; set; };
}

public class OrderDetails
{
  public override int OrderdetailsId { get; set; }
  public int OrderId { get; set; }
  public int ProductID { get; set; }
  public int Qty { get; set; }
  public List<OrderStatus> OrderStat { get; set; };
}

public class OrderStatus
{
public override int OrderdetailsStatusId { get; set; }  
public int OrderdetailsId  { get; set; }
public int StatusID { get; set; }

}

I cannot use LinQ. I want to populate the order object like we do in LinQ.

How do I populate all all the properties in Order object:
for eg.

Order o =new Order();
o.FName="John";
o.LName="abc";
o.Street="TStreet";
o.City="Atlanta";

then
o.Orderdetails.Add(orderdetails)

How do I do that here in C# when not using LinQ.

  • 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-15T08:46:59+00:00Added an answer on May 15, 2026 at 8:46 am

    Are you talking about being able to do this:

    Order o =new Order
    {
        FName="John",
        LName="abc",
        Street="TStreet",
        City="Atlanta"
    };
    

    Because you sould still be able to do that, even without LINQ;

    You could even go so far as to:

    Order o =new Order
    {
        FName="John",
        LName="abc",
        Street="TStreet",
        City="Atlanta"
    };
    
    o.OrderDetails = new List<OrderDetail>();
    o.Add(new OrderDetail { OrderdetailsId = 1, Qty = 0 /* etc */});
    

    But that can get a bit confusing.

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

Sidebar

Related Questions

Using LINQ to SQL, I have an Order class with a collection of OrderDetails.
I have a simple WCF service: public Order[] GetOrdersByStatus(int statusid) { OrderService os =
I have a 'Purchase Order' class. It contains information about a single purchase order.
After user places an order I have to send detailed email message containing order
What is the best practice to implement the following: we have a classes Order
I have a large database of normalized order data that is becoming very slow
In order to debug an asp.net web app I have to have IE Script
I have overridden the windows ListBox in order to display an image and a
I have created an HttpCookie in order to share data across a subdomain :
I have a small program to order and sort email messages, outputting to a

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.