Пример #1
0
        public ContaClienteRepositoryShould()
        {
            // Given
            _options = new DbContextOptionsBuilder <OperacaoCaixaContext>()
                       .UseMySql("Server=s-east-1.rds.amazonaws.com;Database=operacao;Uid=n;Pwd=dvL7V;CharSet=utf8;")
                       .Options;

            _operacaoCaixaContext   = new OperacaoCaixaContext(_options);
            _contaClienteRepository = new ContaClienteRepository(_operacaoCaixaContext);
        }
Пример #2
0
 public ContaOperacaoRepository(OperacaoCaixaContext db)
 {
     _db = db;
 }
Пример #3
0
 public PessoaRepository(OperacaoCaixaContext db)
 {
     _db = db;
 }
Пример #4
0
        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(IApplicationBuilder app, ILoggerFactory loggerFactory, IHostingEnvironment env, OperacaoCaixaContext db)
        {
            loggerFactory.AddConsole(Configuration.GetSection("Logging"));
            loggerFactory.AddDebug();

            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
            }

            app.UseGraphiQl();
            app.UseMvc();
            db.EnsureSeedData();
        }