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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T21:33:35+00:00 2026-05-27T21:33:35+00:00

UPDATE: what i am looking is should i go create each classes seprately instead

  • 0

UPDATE:

what i am looking is should i go create each classes seprately instead of adding getter/setter prop in the class, what i mean by that is:

so in order to create a Visit i should have the following prop in VISIT

VisitName, Purpose, StartDate, EndDate, HostId, HostName, RequesterId, RequeserName

or should i have this:

VisitName, Purpose, StartDate, EndDate, IPerson Host, IPerson Requester

END UPDATE

i need advice/feedback if i am going on the right direction below is the domain model (part of the project not entirly).

i have class called “Visit” in that Visit model i will have basic of visit like name,purpose,start,end date etc… and in that class i also have who will be hosting the visit and who request the visit.

what do you think of the below class?

enter image description here

 //aggreate class
public class Visit
{
    IVisitBasic _visitBasic;
    IPerson _host;
    IPerson _requester;

public IVisitBasic VisitBasic
{
    get { return _visitBasic; }
    set { _visitBasic = value; }
}

public IPerson Host
{
    get { return _host; }
    set { _host = value; }
}

public IPerson Requester
{
    get { return _requester; }
    set { _requester = value; }
}

public Visit(IVisitBasic visitBasic, IPerson host, IPerson requester)
{
    _visitBasic = visitBasic;
    _host = host;
    _requester = requester;
}

public Visit() { }

}

  • 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-27T21:33:36+00:00Added an answer on May 27, 2026 at 9:33 pm

    It looks ok as a start, but I wouldn’t make a hard and fast domain model until you have actually started coding and testing the initial domain model as you will probably find that things don’t quite work as expected or there is something that you have missed, or the requirements change, etc.

    Other points from a quick look.

    • What is the purpose of VisitBasic, should it be an abstract base class or the name made clearer?
    • You may want to make the host into it’s own class, it may have information not relevant to the person class, so possibly a sub class of person. But as stated above it may be better to develop it iteratively. And possibly requester as well but probably less likely.

    UPDATE RESPONSE:
    The standard design now for most things is to add a service layer, i.e. VisitService with a createVisit method, and the properties on the visit object should just link to the host and requester without having any business logic in them. (Hope that answers your question?)

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

Sidebar

Related Questions

I'm looking for a way to create an online form that will update an
Looking through some code I came across the following code trTuDocPackTypdBd.update(TrTuDocPackTypeDto.class.cast(packDto)); and I'd like
I'm looking to create a report with similar that has a checkbox next to
I'm working on a script that will create or update products in my catalog.
I'm looking to update our project's jaxb version from 1 to 2. Has anyone
I have a legacy service I'm looking to update to WCF and one of
Where can I download .NetFramework 4 SDK? Update I am looking specifically for the
I am looking to parse INSERT and UPDATE MySQL SQL queries in PHP to
Looking at all the possibilites of creation / update columns in NHibernate I mostly
Looking for a good tutorial on how to update a mysql database using 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.