public void Transaction_Test() { var factory = new AdoNetFactory(); var uow = new ADOUnitOfWork(factory); var turmaRepository = new TurmaRepositorySql(factory); }
public DatabaseTestInitializer(IUnitOfWork Uow, AdoNetFactory factory) { repo = new RepositoryBaseADO(factory); Truncate(); Uow.Commit(); Seed(); Uow.Commit(); }
public override void Initialize() { base.Initialize(); Factory = new AdoNetFactory(); Uow = new ADOUnitOfWork(Factory); new DatabaseTestInitializer(Uow, 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 PresencaRepositorySql(AdoNetFactory factory) : base(factory) { }
public AulaRepositorySql(AdoNetFactory factory) : base(factory) { _repoPresenca = new PresencaRepositorySql(factory); }
public TurmaRepositorySql(AdoNetFactory factory) : base(factory) { }
public void Abrir_Conexao_Test() { var factory = new AdoNetFactory(); Assert.IsTrue(factory.Connection.State == ConnectionState.Open); }
public RepositoryBaseADO(AdoNetFactory factory) { _factory = factory; }