public AgendaController()
 {
     DateRepository = new DateRepository();
     HolidayRepository = new HolidayRepository();
     TimeSlotRepository = new TimeSlotRepository();
     ContactRepository = new ContactRepository();
 }
 public RendezVousController()
 {
     SlotRepository = new TimeSlotRepository();
     ContactRepository = new Repository<Contact>();
     DateRepository = new DateRepository();
     HolidayRepository = new HolidayRepository();
 }
Exemple #3
0
 public UnitOfWork(ManageItDbContext context)
 {
     _context = context;
     Users    = new UserRepository(_context);
     //Requests = new RequestRepository(_context);
     TimeSlots = new TimeSlotRepository(_context);
 }
Exemple #4
0
 /// <summary>
 /// Initialize new instance of EventManagementService
 /// </summary>
 /// <param name="eventRepository">EventRepository to operate with</param>
 /// <param name="placeRepository">PlaceRepository to operate with</param>
 /// <param name="timeSlotRepository">TomeSlotRepository to operate with</param>
 public EventManagementService(EventRepository eventRepository, PlaceRepository placeRepository,
                               TimeSlotRepository timeSlotRepository)
 {
     _eventRepository    = eventRepository;
     _placeRepository    = placeRepository;
     _timeSlotRepository = timeSlotRepository;
 }
Exemple #5
0
        public UnitOfWork(IDatabaseContext databaseContext)
        {
            _context = databaseContext ?? throw new ArgumentNullException(nameof(databaseContext));

            EventRepository          = new EventRepository(_context);
            EditionRepository        = new EditionRepository(_context);
            ActivityRepository       = new ActivityRepository(_context);
            ActivityStatusRepository = new ActivityStatusRepository(_context);
            ActivityTypeRepository   = new ActivityTypeRepository(_context);
            TimeSlotRepository       = new TimeSlotRepository(_context);
        }
Exemple #6
0
        //public UnitOfWork()
        //{
        //    UserRegisters = new RegisterRepository(_applicationDbContext);
        //    UserRoles = new RoleRepository(_applicationDbContext);

        //    Appointment = new AppointmentRepository(_applicationDbContext);
        //    Doctors = new DoctorRepository(_applicationDbContext);
        //    Patient = new PatientRepository(_applicationDbContext);
        //    Specialization = new SpecializationRepository(_applicationDbContext);
        //    TimeSlot = new TimeSlotRepository(_applicationDbContext);
        //}
        public UnitOfWork(ApplicationDbContext applicationDbContext)
        {
            _applicationDbContext = applicationDbContext;
            UserRegisters         = new RegisterRepository(_applicationDbContext);
            UserRoles             = new RoleRepository(_applicationDbContext);
            Locations             = new LocationRepository(_applicationDbContext);
            States         = new StateRepository(_applicationDbContext);
            Appointment    = new AppointmentRepository(_applicationDbContext);
            Doctors        = new DoctorRepository(_applicationDbContext);
            Patient        = new PatientRepository(_applicationDbContext);
            Specialization = new SpecializationRepository(_applicationDbContext);
            TimeSlot       = new TimeSlotRepository(_applicationDbContext);
        }
Exemple #7
0
 public UnitOfWork()
 {
     _dbContext            = new ApplicationDbContext();
     Users                 = new UserRepository(_dbContext);
     Teachers              = new TeacherRepository(_dbContext);
     Students              = new StudentRepository(_dbContext);
     Courses               = new CourseRepository(_dbContext);
     Rooms                 = new RoomRepository(_dbContext);
     Campuses              = new CampusRepository(_dbContext);
     Attendances           = new AttendanceRepository(_dbContext);
     StatusAttendances     = new StatusAttendanceRepository(_dbContext);
     StatusTimeTables      = new StatusTimeTableRepository(_dbContext);
     TimeSlots             = new TimeSlotRepository(_dbContext);
     TimeTables            = new TimeTableRepository(_dbContext);
     StudentGroups         = new StudentGroupRepository(_dbContext);
     StatusTakeAttendances = new StatusTakeAttendanceRepository(_dbContext);
     StudentFaces          = new StudentFacesRepository(_dbContext);
     IdentityStudents      = new IdentityStudentRepository(_dbContext);
     RecognitionImages     = new RecognitionImageRepository(_dbContext);
     Messages              = new MessageRepository(_dbContext);
     StatusesMessage       = new StatusMessageRepository(_dbContext);
 }
Exemple #8
0
 public TimeSlotService()
 {
     _TimeSlotRepository = new TimeSlotRepository();
     _sessionRepository  = new SessionRepository();
     _costRuleRepository = new CostRuleRepository();
 }
 public TimeSlotInitializer(TimeSlotRepository repository)
 {
     Repository = repository;
 }
 public AdministrationController()
 {
     TimeSlotRepository = new TimeSlotRepository();
     ContactRepository = new ContactRepository();
 }
Exemple #11
0
 /// <summary>
 /// Initialize new instance of EventDetailsService
 /// </summary>
 /// <param name="placeRepository">PlaceRepository to operate with</param>
 /// <param name="timeSlotRepository">TimeSlotRepository to operate with</param>
 public EventDetailsService(PlaceRepository placeRepository, TimeSlotRepository timeSlotRepository)
 {
     _placeRepository    = placeRepository;
     _timeSlotRepository = timeSlotRepository;
 }
        public TRepository GetRepository <TRepository>(IUnitOfWork unitOfWork)
            where TRepository : class
        {
            if (typeof(TRepository) == typeof(IBedRepository))
            {
                dynamic repo = new BedRepository();
                repo.UnitOfWork = unitOfWork;
                return((TRepository)repo);
            }
            if (typeof(TRepository) == typeof(IRoomRepository))
            {
                dynamic repo = new RoomRepository();
                repo.UnitOfWork = unitOfWork;
                return((TRepository)repo);
            }
            if (typeof(TRepository) == typeof(IOutletRepository))
            {
                dynamic repo = new OutletRepository();
                repo.UnitOfWork = unitOfWork;
                return((TRepository)repo);
            }
            if (typeof(TRepository) == typeof(ICustomerRepository))
            {
                dynamic repo = new CustomerRepository();
                repo.UnitOfWork = unitOfWork;
                return((TRepository)repo);
            }
            if (typeof(TRepository) == typeof(ITherapistRepository))
            {
                dynamic repo = new TherapistRepository();
                repo.UnitOfWork = unitOfWork;
                return((TRepository)repo);
            }

            if (typeof(TRepository) == typeof(IServiceRepository))
            {
                dynamic repo = new ServiceRepository();
                repo.UnitOfWork = unitOfWork;
                return((TRepository)repo);
            }

            if (typeof(TRepository) == typeof(IService_BedRepository))
            {
                dynamic repo = new Service_BedRepository();
                repo.UnitOfWork = unitOfWork;
                return((TRepository)repo);
            }
            if (typeof(TRepository) == typeof(IAppoitmentDetailRepository))
            {
                dynamic repo = new AppoitmentDetailRepository();
                repo.UnitOfWork = unitOfWork;
                return((TRepository)repo);
            }
            if (typeof(TRepository) == typeof(IReviewOutletRepository))
            {
                dynamic repo = new ReviewOutletRepository();
                repo.UnitOfWork = unitOfWork;
                return((TRepository)repo);
            }

            if (typeof(TRepository) == typeof(ITimeSlotRepository))
            {
                dynamic repo = new TimeSlotRepository();
                repo.UnitOfWork = unitOfWork;
                return((TRepository)repo);
            }

            if (typeof(TRepository) == typeof(IReviewOutletRepository))
            {
                dynamic repo = new ReviewOutletRepository();
                repo.UnitOfWork = unitOfWork;
                return((TRepository)repo);
            }

            if (typeof(TRepository) == typeof(IBufferTimeRepository))
            {
                dynamic repo = new BufferTimeRepository();
                repo.UnitOfWork = unitOfWork;
                return((TRepository)repo);
            }

            if (typeof(TRepository) == typeof(IAppoitmentRepository))
            {
                dynamic repo = new AppoitmentRepository();
                repo.UnitOfWork = unitOfWork;
                return((TRepository)repo);
            }

            if (typeof(TRepository) == typeof(IOutlet_StaffRepository))
            {
                dynamic repo = new Outlet_StaffRepository();
                repo.UnitOfWork = unitOfWork;
                return((TRepository)repo);
            }

            if (typeof(TRepository) == typeof(IMeasurementRepository))
            {
                dynamic repo = new MeasurementRepository();
                repo.UnitOfWork = unitOfWork;
                return((TRepository)repo);
            }

            if (typeof(TRepository) == typeof(IServiceTypeRepository))
            {
                dynamic repo = new ServiceTypeRepository();
                repo.UnitOfWork = unitOfWork;
                return((TRepository)repo);
            }

            if (typeof(TRepository) == typeof(IReviewServiceRepository))
            {
                dynamic repo = new ReviewServiceRepository();
                repo.UnitOfWork = unitOfWork;
                return((TRepository)repo);
            }

            TRepository repository = null;

            return(repository);
        }