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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T13:06:56+00:00 2026-05-22T13:06:56+00:00

I’m learning to program using C# and ASP.NET with a SQL Server database. I

  • 0

I’m learning to program using C# and ASP.NET with a SQL Server database. I have developed a system to store and view trades taken on a financial market. Basic functionality is:

  • Add/Update/Delete an Order
  • Add/Update/Delete a Trade (a trade comprises one or more orders)
  • View trades
  • View orders

There are other entities as well, things like Brokers, Accounts, Strategies, etc that support the main Order and Trade entities.

I have designed my program to have a Database utility class called DBUtil which has all the interfaces to the database. For example to add a new trade I would call DBUtil.InsertTrade(<params>), to add an order DBUtil.InsertOrder(<params>), to update a trade, DBUtil.UpdateTrade(<params>), etc. I was wondering if it would be better to create a Trade class, an Order class, a Broker class, etc. Would that improve the elegance, quality and maintainability of the program? It seems like adding a lot more code for no benefit, well, I can’t see the benefits right now of taking such an approach.

As far as I can see adding a Trade class would simply create an extra layer of code, because I would have to call DBUtil.InsertTrade() from the Trade class anyway when adding a trade, for example.

  • 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-22T13:06:57+00:00Added an answer on May 22, 2026 at 1:06 pm

    It really depends on what the application will grow into and who will maintain it.

    IF you are happy with it at the minute then why change it.

    I would advise you to read up on software development patterns, at the minute it sounds like you are using the Active Record pattern, and that is OK:

    http://en.wikipedia.org/wiki/Active_record_pattern

    What you are thinking of is moving to a Domain Driven Design solution.

    http://en.wikipedia.org/wiki/Domain-driven_design

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

Sidebar

Related Questions

No related questions found

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.