public ReleaseStudentBookAppl(IStudentDeclarationRepository declarationRepository, ITypeAdapter adapter, IStudentReleaseRecordRepository studentReleaseRecordRepository, IStudentRepository studentRepository, ITeachingTaskRepository teachingTaskRepository, ITextbookRepository textbookRepository, IInventoryRepository inventoryRepository, IOutStockRecordRepository outStockRecordRepository, IBooksellerRepository booksellerRepository, IProfessionalClassRepository classRepository, IReleaseRecordRepository releaseRecordRepository, ITypeAdapter typeAdapter)
 {
     _declarationRepository = declarationRepository;
     _stuRepo = studentRepository;
     _teachingTaskRepository = teachingTaskRepository;
     _inventoryRepository = inventoryRepository;
     _outStockRecordRepository = outStockRecordRepository;
     _booksellerRepository = booksellerRepository;
     _classRepository = classRepository;
     _releaseRecordRepository = releaseRecordRepository;
     _adapter = typeAdapter;
 }
Ejemplo n.º 2
0
        private readonly ITeacherDeclarationRepository _teaDeclRepo; // = ServiceLocator.Current.GetInstance<ITeacherDeclarationRepository>();

        #endregion Fields

        #region Constructors

        public SubscriptionAppl(ITypeAdapter adapter,
            IStudentDeclarationJiaoWuRepository stuDeclJiaoWuRepo,
            ITeacherDeclarationJiaoWuRepository teaDeclJiaoWuRepo,
            IStudentDeclarationRepository stuDeclRepo,
            ITeacherDeclarationRepository teaDeclRepo,
            ISubscriptionRepository subscriptionRepo,
            IRepositoryContext context
            )
        {
            _adapter = adapter;
            _stuDeclRepo = stuDeclRepo;
            _teaDeclRepo = teaDeclRepo;
            _stuDeclJiaoWuRepo = stuDeclJiaoWuRepo;
            _teaDeclJiaoWuRepo = teaDeclJiaoWuRepo;
            _subscriptionRepo = subscriptionRepo;
            _contextForUpdate = context;
        }
        public void Initialize()
        {
            _context = new EntityFrameworkRepositoryContext();
            _trans = new TransactionScope();

            _adapter = new AutoMapperTypeAdapter();
            _stuDeclJiaoWuRepo = new StudentDeclarationJiaoWuRepository(_context);
            _teaDeclJiaoWuRepo = new TeacherDeclarationJiaoWuRepository(_context);
            _stuDeclRepo = new StudentDeclarationRepository(_context);
            _teaDeclRepo = new TeacherDeclarationRepository(_context);
            _subscriptionRepo = new SubscriptionRepository(_context);

            _appl = new SubscriptionAppl(
                _adapter,
                _stuDeclJiaoWuRepo,
                _teaDeclJiaoWuRepo,
                _stuDeclRepo,
                _teaDeclRepo,
                _subscriptionRepo
                );
        }