Ejemplo n.º 1
0
        // 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;
 }
Ejemplo n.º 3
0
 public EmployeeController(EmpMgtSys employee, UserManager <IdentityUser> userManager)
 {
     _employee    = employee;
     _userManager = userManager;
 }
 public EmployeeController(EmpMgtSys eManager)
 {
     _eManager = eManager;
 }