// This method gets called by the runtime. Use this method to add services to the container. public void ConfigureServices(IServiceCollection services) { services.AddControllers(); // package to overide deserialization and allow to use constructor overloading services.AddControllers().AddNewtonsoftJson(); // creating an instance of employee mgt storage which is the main class var employeeStorage = new EmpStorageLists(); var eManager = new EmpMgtSys(employeeStorage); services.AddSingleton <EmpMgtSys>(eManager); }
public SearchController(EmpMgtSys eManager) { _eManager = eManager; }
public EmployeeController(EmpMgtSys employee, UserManager <IdentityUser> userManager) { _employee = employee; _userManager = userManager; }
public EmployeeController(EmpMgtSys eManager) { _eManager = eManager; }