Better to have huge Controllers, or many controllers, in MVC?

Partial classes allow you to spread your class across multiple files. That way you can group relevant areas of your controller into separate files, and yet they’ll all still be part of the same controller. e.g.

EmployeeDeductionController.cs

public partial class EmployeeController
{
    public ActionResult Deduct()
    {
    }
    // etc
}

EmployeeBenefitController.cs

public partial class EmployeeController
{
    public ActionResult GiveBenefit()
    {
    }
    // etc
}

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)