Note that there are some explanatory texts on larger screens.

plurals
  1. POMVC -- Differences between Models, Objects, and Repositories
    primarykey
    data
    text
    <p>I'd just like to get some clarification in the MVC pattern as to what belongs in Models, specifically the contents of the Models folder in MVC3, versus repositories and objects.</p> <p>Right now, in my current MVC3 Solution, I have 4 projects:</p> <ol> <li>A Project called "Objects", which holds information about all the core objects in my application.</li> <li>A Project called "Data" which holds information information about the Data Context and repositories for each of the objects (created using MVC3 scaffolding)</li> <li>The Web project, which holds the Controllers, Views, and -- the subject of this question -- Models</li> <li>A Unit Testing project</li> </ol> <p>What I really would like to get clarification about is the difference between what should go in the Objects project vs. what goes in the Models folder of the web project. Right now I'm only using the Models folder for holding what I'd call "View Models", which typically contain combinations of the core objects. Should the files in this folder only contain definitions defining the model contents, or should it contain other code that the controller may call?</p> <p>I think that I have a pretty good understanding of both controllers and repositories, but sometimes I get confused as to whether certain code should go in one or the other. Are there any specific guidelines or limitations out there as to what absolutely should NOT go in a controller but should go in either a repository or a model instead?</p> <p>Thanks as always. </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload