I am following below article and repository pattern.
I am confused at one point, optional contructor defined in controller.
public StudentController(IStudentRepository studentRepository)
{
this.studentRepository = studentRepository;
}
Even if, I remove that - code works well. what is use of this constructor. As we are assing new context object in main default constructor.