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); }
public ContaOperacaoRepository(OperacaoCaixaContext db) { _db = db; }
public PessoaRepository(OperacaoCaixaContext db) { _db = db; }
// 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(); }