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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T05:18:22+00:00 2026-05-15T05:18:22+00:00

I have three entities that must interact: User , SupportTicket and PhoneConversation . When

  • 0

I have three entities that must interact: User, SupportTicketand PhoneConversation. When someone calls in requesting help, the User should have a SupportTicket assigned to him, with a PhoneConversation assigned to the Ticked describing the call.

My question is: In what entity should I put the method CreatePhoneSupportTicket() that creates a new SupportTicket and a PhoneConversation, relates them to each other and finally relates the SupportTicket to the User?

I’m guessing it can’t be on the user because that would violate the SRP (the user does a few more things). But the method itself does more than one thing, it should create both a SupportTicket and a PhoneConversation. Is this a situation when a Service is a better solution then putting methods on entities? Thanks for your help!

  • 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-15T05:18:23+00:00Added an answer on May 15, 2026 at 5:18 am

    There’s nothing wrong with using the new operator if it fits the rest of your logic. If there is only one kind of SupportTicket, use new SupportTicket(currentUser) to create one. Or, if the dependency is the other way, add a CreateSupportTicket() method to User and call new SupportTicket() there. The SupportTicket constructor in turn can create a new PhoneConversation(). If you decide later that you should have used some kind of factory, you can always refactor your code. But until then, go for the simplest solution you can imagine.

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

Sidebar

Related Questions

I have three unordered lists that have been created as Scriptaculous Sortables so that
I have three classes that pose a problem when trying to add a new
I have a data model with three entities (Purchase, Items, Image) the purchase is
I have a Core Data model which has three entities: A, B, and C.
In DDD you should never let your entities enter an invalid state. That being
I have three core data entities which I am importing into, they are: •
If I'm using an ORM like JPA2 - where I have my entities that
I have email addresses encoded with HTML character entities. Is there anything in .NET
I have three tables: page, attachment, page-attachment I have data like this: page ID
I have three tables tag , page , pagetag With the data below page

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.