I use the repository pattern for data handling.
In my DAL folder i have IUserRepository, UserRepository and UserContext. Inside the models folder i have a class called User like id, username etc.
I read on the internet that I should do as less as possible in the controller. What do they mean?
I want to determine where to put the business logic For example I want to page a login page. What would happen if I put the login function alongside the models?
using IndividueleOpdracht.Dal;
namespace IndividueleOpdracht.Models
{
public class AccountModel
{
public void Login(string username, string password)
{
// Do something with the repositories?
}
}
}
And then just call the AccountModel.Login method in the controller?