public MoveTileHandler(DeckDbContext context, IMapper mapper, IValidator <MoveTileCommand> validator, IHubContext <NotifyHub> hubContext) { _mapper = mapper; _context = context; _validator = validator; _hubContext = hubContext; }
public MoveTileValidator(DeckDbContext context) { RuleSet("MoveTileSet", () => { RuleFor(x => x.Tile) .NotEmpty() .WithMessage("Tile cannot be null") .InclusiveBetween(1, 16) .WithMessage("Tile must be between 1 and 16"); }); }
public NewDeckHandler(DeckDbContext context, IMapper mapper) { _mapper = mapper; _context = context; }
public GetLeaderboardHandler(DeckDbContext context, IMapper mapper) { _mapper = mapper; _context = context; }
public CreateDatabaseHandler(DeckDbContext context) { _context = context; }
// 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, DeckDbContext context) { loggerFactory.AddConsole(Configuration.GetSection("Logging")); loggerFactory.AddDebug(); if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); app.UseBrowserLink(); } else { app.UseExceptionHandler("/Home/Error"); } app.UseStaticFiles(); app.UseMvc(routes => { routes.MapRoute( name: "default", template: "{controller=Home}/{action=Index}/{id?}"); }); context.Database.EnsureCreated(); }