Exemplo n.º 1
0
        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(
            IApplicationBuilder app,
            IHostingEnvironment env,
            ILoggerFactory loggerFactory,
            WhatsNearbyApiContext WhatsNearbyApiContext)
        {
            app.UseCors("CorsPolicy");

            loggerFactory.AddNLog();

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

            //TODO: implement database seed

            AutoMapper.Mapper.Initialize(config => {
                config.CreateMap <CustomUser, CustomUserDto>();
            });

            app.UseAuthentication();

            app.UseMvc();
        }
Exemplo n.º 2
0
 public UserRepository(WhatsNearbyApiContext context)
 {
     _context = context;
 }