예제 #1
0
 public UsersController(
     ILogger <UsersController> logger,
     MealsDbContext dbContext,
     UserManager <User> userManager
     )
 {
     this.logger      = logger;
     this.dbContext   = dbContext;
     this.userManager = userManager;
 }
예제 #2
0
        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(IApplicationBuilder app, IHostingEnvironment env, MealsDbContext mealsDbContext)
        {
            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
            }
            else
            {
                app.UseHsts();
            }

            app.UseHttpsRedirection();
            app.UseSwagger();
            app.UseSwaggerUI(c => c.SwaggerEndpoint("/swagger/v1/swagger.json", "Meal Order API"));
            app.UseMvc();
        }
예제 #3
0
 public MealsController(ILogger <MealsController> logger, MealsDbContext dbContext)
 {
     this.logger    = logger;
     this.dbContext = dbContext;
 }
예제 #4
0
 public InjectFilterImpl(MealsDbContext dbContext, string routeUserIdParam, params string[] roles)
 {
     this.dbContext        = dbContext;
     this.routeUserIdParam = routeUserIdParam;
     this.roles            = roles ?? new string[0];
 }
예제 #5
0
 public RestaurantsRepository(MealsDbContext context)
 {
     _context = context;
 }
예제 #6
0
 public MealsService(MealsDbContext db, IMapper mapper, IBus publisher)
     : base(db)
 {
     this.mapper    = mapper;
     this.publisher = publisher;
 }
예제 #7
0
 public MealsRepository(MealsDbContext context)
 {
     _context = context;
 }