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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T19:36:02+00:00 2026-06-17T19:36:02+00:00

I am building MVC 4 application for some kind of web store. This is

  • 0

I am building MVC 4 application for some kind of web store. This is first time for me to do anything with ASP.NET so I spent some time reading about whole idea of mvc pattern, and how it is implemented in latest version.

I understood that I need to write Model for data, and I decided to do Code-first approach.

Also I like to different classes move in different files. And also different parts in different classes.

Now I not sure how should I organize model classes. When I make project with “Internet Application” template, I already get AccountModel with user information. It does not sound right for me that I should put information about products in that model. But if I make separate model I will need some kind of connection between this 2 models and I not sure how to make it.

Or should I put whole db in one model?

  • 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-06-17T19:36:03+00:00Added an answer on June 17, 2026 at 7:36 pm

    I would recommend putting everything into one Model, if it’s possible.

    Here’s a couple of examples, from the code-behind point-of-view and databases:

    1. I used a single Model, when I’ve had to access/manipulate data from a single database.
    2. I used multiple Models, when I’ve had to access/manipulate data from multiple databases.

    Most of the time I’ve only created a single data context, since multiple ones weren’t logical. Why have multiple data contexts, if you only have a single database?

    To answer your question: I’m not sure how complex this “web store” will be, but I’d advise to create a single Model. You can always move things around later, if necessary.

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

Sidebar

Related Questions

I am building an ASP.NET MVC web application and I'm using jQuery for some
I'm building my first ASP.NET MVC application and I am having some troubles with
I am building an ASP.Net MVC 3 Web application with Entity Framework 4.1. I
I am building a web application using ASP.NET MVC that has two very distinct
I am building a multi-layered application that has an ASP.NET MVC web application. It
I'm building an ASP.NET MVC application. I will store a lot of data per
I am building a .NET MVC web application. Is cloud hosting the way to
Background I'm working on building an ASP.Net MVC 3 application that utilizes: JQueryUI for
I'm building a small application in ASP.NET MVC. I'm still trying to find my
I've been building an application with Fluent nHibernate/ASP.NET MVC - and I've dug around

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.