- If controller is related to central only i.e it contains dbCore only it should inherit from BaseAsyncController
- If controller is related to Organisation also i.e it contains both dbCore and dbOrg it should inherit from BaseAsyncFOController
- While inheriting Any Controller from BaseAsyncController or BaseAsyncFOController, it should initialise base controller with respective variables also.
- eg For BaseAsyncFOController:
using System;
public class DataMaintenanceController : BaseAsyncFOController
{
#region Constructor
public DataMaintenanceController(
CoreAccountingMasterEntities dbCore
, OrgAccDBEntities dbOrg
, IErrorLog ErrorLog
, DBHelper DBHelper
, IAuthServices AuthService
//,... extra
)
: base(dbCore, AuthService, ErrorLog, dbOrg, DBHelper)
{
//..extra code
}
#endregion
}
- eg For BaseAsyncController
using System;
public class DataMaintenanceController : BaseAsyncController
{
#region Constructor
public DataMaintenanceController(
CoreAccountingMasterEntities dbCore
,IErrorLog ErrorLog
,IAuthServices AuthService
//,.. extra
)
: base(dbCore, AuthService, ErrorLog)
{
//..extra code
}
#endregion
}