1

Title is not the best but I will do my best to explain what I mean.

When you create ASP.NET MVC application and you need to fetch data about user profile (just an example) where do you place these files and how do you construct these queries (Lets assume that I'll use some kind of ORM like Linq 2 SQL and that I'll use ninject)

once again lets assume that will have interface which defines all details about user profile (name, surname, password...) now I wonder do you create methods for fetching data like (GetName, GetSurname...) and you define way you fetch data inside UserProfile class which inherits this interface we have defined or you define one method for getting all user account and then preform query inside controller.

If you have any useful links about designing(?) MVC application please post it

1 Answers1

0

see my answer about how to properly layer an ASP.NET MVC application:

MVC3 and Entity Framework

such answer is in fact generic, subjective and does not apply only to web applications, same approach can be used for windows clients and other architectures.

There is nothing magic and actually this is subjective and also depends on experience, the general idea is to minimize or actually avoid dependencies between all layers above DAL and the ORM (if any) used to fetch/map data.

Community
  • 1
  • 1
Davide Piras
  • 43,984
  • 10
  • 98
  • 147