public void Transaction_Test()
        {
            var factory = new AdoNetFactory();

            var uow = new ADOUnitOfWork(factory);

            var turmaRepository = new TurmaRepositorySql(factory);
        }
Exemplo n.º 2
0
        public override void Initialize()
        {
            base.Initialize();

            Factory = new AdoNetFactory();

            Uow = new ADOUnitOfWork(Factory);

            AlunoRepository = new AlunoRepositorySql(Factory);
            TurmaRepository = new TurmaRepositorySql(Factory);
            AulaRepository = new AulaRepositorySql(Factory);
            PresencaRepository = new PresencaRepositorySql(Factory);
        }
        public override void Load()
        {
            var factory = new AdoNetFactory();
            var type = factory.GetType();

            Bind<IUnitOfWork>().To<ADOUnitOfWork>().WithConstructorArgument(type, factory);
            Bind<ITurmaRepository>().To<TurmaRepositorySql>().WithConstructorArgument(type, factory);
            Bind<IAulaRepository>().To<AulaRepositorySql>().WithConstructorArgument(type, factory);
            Bind<IAlunoRepository>().To<AlunoRepositorySql>().WithConstructorArgument(type, factory);

            var authFactory = new AuthFactory();
            var typeAuth = authFactory.GetType();

            Bind<IAuthUnitOfWork>().To<AuthUnitOfWork>().WithConstructorArgument(typeAuth, authFactory);
            Bind<IUserStore<User>>().To<IdentityUserStore>().WithConstructorArgument(typeAuth, authFactory);
            Bind<IAccountRepository>().To<AccountRepository>().WithConstructorArgument(typeAuth, authFactory);
            Bind<IGroupRepository>().To<GroupRepository>().WithConstructorArgument(typeAuth, authFactory);
            Bind<IPermissionRepository>().To<PermissionRepository>().WithConstructorArgument(typeAuth, authFactory);
        }
        public void Abrir_Conexao_Test()
        {
            var factory = new AdoNetFactory();

            Assert.IsTrue(factory.Connection.State == ConnectionState.Open);
        }
 public PresencaRepositorySql(AdoNetFactory factory)
     : base(factory)
 {
 }
Exemplo n.º 6
0
 public ADOUnitOfWork(AdoNetFactory factory)
 {
     _factory = factory;
 }
Exemplo n.º 7
0
 public ADOUnitOfWork(AdoNetFactory factory)
 {
     _factory = factory;
 }
 public AulaRepositorySql(AdoNetFactory factory)
     : base(factory)
 {
     _repoPresenca = new PresencaRepositorySql(factory);
 }