I have been tasked at work, well actually I volunteered to create an MVC site (as a demo) that will eventually be the base for moving my employer's legacy C#/asp.net code to MVC. It's a large site, used globally, and we are a small team of 5 devs. Right now I am the only one working on the MVC site, but the rest of the team will be involved eventually. I don't think any of them have any experience with MVC either.
I had zero experience in MVC before I started this task, and have been learning. Things work in the site, but I am not confident that I am following the best programming practices, other than the basics that would be the same in C#. Like, small methods, small classes, SOLID, etc. Since we are building this site from scratch, I really want to make sure it has a solid foundation.
Do you know of any resources where I can learn some of the basic concepts of good programming for MVC?
For example, one question I have right now is where to put the repository(s). The boss wants the model project (which is using Entity Framework) to be a separate project from the main project for the website. I have them separated and working. The controllers that I have working so far have code in them that really should be in a repository, and I am going to move it. The controllers are in the main project. Code in a view calls a 'get' method or something, in a controller. The controller method should call a method in a repository, which deals with all the database stuff, gets the data and sends it back.
So which project would you put the repositories in? I think it should be in the same project as the EF models, but is that a good standard? Also how many repositories should there be? One repo for each controller, or maybe for a related group of controllers? Same with ViewModels (looks like a DTO or POCO to me). Is it better to have one ViewModel per class, or a related group of them all in one class? There is going to be a lot of different types of functionality when the site is done enough to publish, and I do not want to have a hundred EF models/repos, or one gigantic one either.
Edit - there is no MVC tag and none of the others seemed to fit. ASP.NET is closest, I guess?
Edit2 - found this, in case anyone else has a similar question. https://www.c-sharpcorner.com/article/best-practice-for-mvc/