Example #1
0
        public VisitManager(HospitalContext db, DpApi client, ScheduleManager scheduleManager)
        {
            _db     = db;
            _client = client;

            _mappingRepo     = new DoctorMappingRepository(_db);
            _scheduleRepo    = new ScheduleRepository(_db);
            _visitRepository = new VisitRepository(_db);

            _scheduleManager = new ScheduleManager(_db, _client);
        }
        public NotificationHandler(DpApi client, HospitalContext db = null)
        {
            _db = db ?? new HospitalContext();

            _visitRepo    = new VisitRepository(_db);
            _mappingRepo  = new DoctorMappingRepository(_db);
            _scheduleRepo = new ScheduleRepository(_db);

            _client = client;

            _scheduleManager = new ScheduleManager(_db, _client);
            _visitManager    = new VisitManager(_db, _client, _scheduleManager);
        }