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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T09:16:09+00:00 2026-05-29T09:16:09+00:00

I am creating a calendar application. I have a Appointment table, and a Person

  • 0

I am creating a calendar application. I have a Appointment table, and a Person table. The 2 are linked by PersonID field in each table.

My question is, should my underlying .Net Appointment object contain a property for the PersonName, and I populate the object from a database view (or stored procedure that joins the tables) or is it more correct to have the Appointment class contain a People class? If the answer is the latter, what is the best way of populating the Appointment/Person object from the database?

  • 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-29T09:16:10+00:00Added an answer on May 29, 2026 at 9:16 am

    Supposing you’re not using an ORM, you may take a look at the DAO pattern:
    http://en.wikipedia.org/wiki/Data_access_object

    I would create two DTOs:

    class Person
    {
        public int id { get; set; }
        public String name { get; set; }
    }
    
    class Appointment
    {
        public int id { get; set; }
        public Date when { get; set; }
        public Person who { get; set; }
    }
    

    And a “full” appointment class:

    class FullAppointment
    {
         private Person person;
         private List<Appointment> appointment;
    }
    

    Then a DTO to get data from the DB:

    class AppointmentDTO
    {
       public FullAppointment retrieveFromDb(int personId)
       {//...}
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am creating a calendar application. In the Events table, there are two columns,
I am creating a calendar using a HTML table. I have a problem where
I'm having some difficulties creating a javascript appointment style calendar. While it does render,
I have an application, it is creating an ICS similar to the following: BEGIN:VCALENDAR
I'm creating a calendar that displays a timetable of events for a month. Each
I am creating a calendar in PHP and in the database have a date,
I'm a beginner in MySql. But I am creating a calendar application, where I
I'm creating a calendar application in PHP with CodeIgniter. In the main calendar page,
I am working on a ASP.Net project creating a Outlook like calendar scheduler app.
I have been tasked at re-creating an MS Access calendar in a winforms C#

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.