// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(IApplicationBuilder app, IHostingEnvironment env, BackEndTestContext db)
        {
            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
            }

            app.UseGraphiQl();
            app.UseMvc();
        }
Exemple #2
0
        public static void CodeFirst()
        {
            using (BackEndTestContext context = new BackEndTestContext())
            {
                context.Clientes.Add(new Domain.Models.Cliente("Lucinda Gekcs", 28));
                context.Clientes.Add(new Domain.Models.Cliente("Miranda Malis", 32));
                context.Clientes.Add(new Domain.Models.Cliente("Fagner Moura", 17));
                context.Clientes.Add(new Domain.Models.Cliente("Rodolfo Jussso", 39));
                context.Clientes.Add(new Domain.Models.Cliente("Fabio Resende", 55));
                context.Clientes.Add(new Domain.Models.Cliente("Maria Lucia", 29));

                context.SaveChanges();
            }
        }
Exemple #3
0
 public MovementRepository(BackEndTestContext db)
 {
     _db = db;
 }
Exemple #4
0
 public Repository(BackEndTestContext context)
 {
     Db    = context;
     DbSet = Db.Set <TEntity>();
 }
Exemple #5
0
 public ProductController(BackEndTestContext backEndTestContext)
 {
     _backEndTestContext = backEndTestContext;
 }
Exemple #6
0
 public UserRepository(BackEndTestContext db)
 {
     _db = db;
 }
Exemple #7
0
 public ClienteRepository(BackEndTestContext context) : base(context)
 {
 }
Exemple #8
0
 public UnitOfWork(BackEndTestContext context)
 {
     _context = context;
 }