I'm starting a new MVC 5 project from scratch. I'm using EF 6 (Database First) and Identity 2.0.
My solution consists of 3 different projects: Data (where I have a .edmx and my DB context), Resources (for localization purposes) and Web (the web project itself).
I'm using ViewModels for all my views, by default. Every time I create a new view, the first thing I do is add the ViewModel (if the ViewModels are connected between them, I keep them all in the same file; for example, all the ViewModels related to user accounts I keep in AccountViewModels). So far, this has made things very simple and solved several issues I was having before.
But I'm wondering, does it make sense for me to use Models at all? The only one I am using right now is the one for Identity, which is created by default and contains the ApplicationUser and ApplicationDbContext, both specific and necessary to Identity. Outside of that, it's everything ViewModels.
- Would my Data project be considered the "Model" for my application? Thus, I am in fact using a Model, just that instead of being a bunch of classes I keep in Web\Models, it's a separate project where the "Models" (BL objects created by Entity) are stored. I think so, but I am not sure.
- Is this a right approach, or could there be potential issues down the road? It's my first take on web programming so I would appreciate any advice.