Ejemplo n.º 1
0
        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
        {
            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
            }
            var options = new DbContextOptions <JMAREXAMContext>();

            using (var client = new JMAREXAMContext(options))
            {
                client.Database.EnsureCreated();
            }


            app.UseHttpsRedirection();

            app.UseRouting();

            app.UseCors(MyAllowSpecificOrigins);

            app.UseSwagger();

            app.UseSwaggerUI(c =>
            {
                c.SwaggerEndpoint("/swagger/v1/swagger.json", "PPC V2");
            });

            app.UseAuthentication();
            app.UseAuthorization();

            app.UseEndpoints(endpoints =>
            {
                endpoints.MapControllers();
            });
        }
Ejemplo n.º 2
0
 public UsuarioRepository(JMAREXAMContext _Contexts) : base(_Contexts)
 {
     _Context = _Contexts;
 }
Ejemplo n.º 3
0
 public ProdcutRepository(JMAREXAMContext _Contexts) : base(_Contexts)
 {
     _Context = _Contexts;
 }