Beispiel #1
0
 /// <summary>
 /// Contructor of DelegationRequest
 /// </summary>
 /// <param name="errorService">error service</param>
 /// <param name="requestService">request service</param>
 /// <param name="statusRequestService">status request service</param>
 public DelegationRequestController(IErrorService errorService, IDelegationRequestService delegationRequestService, IRequestService requestService, ISystemService systemService, IPermissionService permissionService)
     : base(errorService)
 {
     this._delegationRequestService = delegationRequestService;
     this._requestService           = requestService;
     this._permissionService        = permissionService;
 }
 public void Initialize()
 {
     DbContext               = new TMSDbContext();
     dbFactory               = new DbFactory();
     objRequestRepository    = new RequestRepository(dbFactory);
     statusRequestRepository = new StatusRequestRepository(dbFactory);
     objAppUserRepository    = new AppUserRepository(dbFactory);
     unitOfWork              = new UnitOfWork(dbFactory);
     contextServices         = new DelegationRequestService(objRequestRepository, statusRequestRepository, unitOfWork);
     userManager             = new UserManager <AppUser>(new UserStore <AppUser>(DbContext));
     UserID1 = userManager.FindByName("nvthang").Id;
     UserID2 = userManager.FindByName("dmtuong").Id;
 }