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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T22:08:42+00:00 2026-05-11T22:08:42+00:00

In MVC, 1 model 1 tables or 1 model several tables? I am building

  • 0

In MVC, 1 model 1 tables or 1 model several tables?

I am building an application that contain 3 tables. I don’t know whether I should create one model for all 3 tables or create 3 models for 3 tables.

In the case I use 3 models for 3 tables, where should I put the code if I want to join these 3 tables? Put the code in any one of 3 models?

Any suggestions?

  • 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-11T22:08:43+00:00Added an answer on May 11, 2026 at 10:08 pm

    Usually you will create one model per table, so in your case it means you need 3 models.
    When i say “Model” i mean a class that will represent a single row (usually) in a single table.

    for example:
    Tables:

    1. Products
    2. Orders
    3. Customers

    in such case the most easy and simple is to create 3 different classes (which represents the data model of the application) where the first class represents a single product the next represents an order and the last class will represent a single customer.

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

Sidebar

Related Questions

My application works with the MVC model. The model contains a Bindable class (BindableItemsClass)
I am setting up an application using the MVC model and I have a
As a PHP/Web Developer, I'm a huge fan of MVC (Model-View-Controller). I love building
I'm crating a simple MVC app that has People and Notes tables. Using the
I have a mvc 3 vb.net app that I need to generate several viewbags
I'm writing my first application with Zendframework. My question is about the Model–View–Controller (MVC)
I'm trying to create an MVC view that will display some data in a
So I have this application in ASP MVC 3. My database has two tables:
We have several projects (ASP.NET MVC) that will require a Role / User /
Background: I started to create logical database model for ASP.NET MVC web site. I

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.