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)
        {
            loggerFactory.AddConsole(Configuration.GetSection("Logging"));
            loggerFactory.AddDebug();

            app.UseMvc();
            app.UseSwagger();

            // Enable middleware to serve swagger-ui (HTML, JS, CSS etc.), specifying the Swagger JSON endpoint.
            app.UseSwaggerUI(c =>
            {
                c.SwaggerEndpoint("/swagger/v1/swagger.json", "My API V1");
            });

            using (RaceAppDb RcDb = new RaceAppDb())
            {
                RcDb.Database.EnsureCreated();

                var userprofile = new UserProfile()
                {
                    FirstName = $"Ali", LastName = $"Baba"
                };
                RcDb.UserProfile.Add(userprofile);

                RcDb.SaveChanges();
            }
        }
Exemplo n.º 2
0
 public NotificationController(RaceAppDb context)
 {
     _context = context;
 }
Exemplo n.º 3
0
 public ContactController(RaceAppDb context)
 {
     _context = context;
 }
Exemplo n.º 4
0
 public UserProfileController(RaceAppDb context)
 {
     _context = context;
 }
Exemplo n.º 5
0
 public BannerController(RaceAppDb context)
 {
     _context = context;
 }
Exemplo n.º 6
0
 public PartnersController(RaceAppDb context)
 {
     _context = context;
 }
Exemplo n.º 7
0
 public DoorPrizeController(RaceAppDb context)
 {
     _context = context;
 }
Exemplo n.º 8
0
 public RaceController(RaceAppDb context)
 {
     _context = context;
 }
Exemplo n.º 9
0
 public InboxController(RaceAppDb context)
 {
     _context = context;
 }
Exemplo n.º 10
0
 public MedalController(RaceAppDb context)
 {
     _context = context;
 }
Exemplo n.º 11
0
 public CharityController(RaceAppDb context)
 {
     _context = context;
 }
 public TransactionalHistoryController(RaceAppDb context)
 {
     _context = context;
 }
Exemplo n.º 13
0
 public ResultController(RaceAppDb context)
 {
     _context = context;
 }
Exemplo n.º 14
0
 public SubmitController(RaceAppDb context)
 {
     _context = context;
 }