public BowlingController(BowlingContext context, PortfolioContext userContext, UserManager <ApplicationUser> userManager, ILogger <BowlingController> logger) { _bowlingContext = context; _userContext = userContext; _userManager = userManager; _logger = logger; }
public BowlingSystemTests() { var optionsBuilder = new DbContextOptionsBuilder <BowlingContext>(); optionsBuilder.UseSqlServer("Server=(localdb)\\mssqllocaldb;Database=BengansBowling;Trusted_Connection=True;MultipleActiveResultSets=true"); //optionsBuilder.UseInMemoryDatabase(Guid.NewGuid().ToString()); var context = new BowlingContext(optionsBuilder.Options); _serviceProvider = new ServiceCollection() .AddTransient <BowlingSystem>() .AddTransient <IPartyRepository, SqlPartyRepository>() .AddTransient <IAccountabilityRepository, SqlAccountabilityRepository>() .AddTransient <IAccountRepository, SqlAccountRepository>() .AddSingleton <BowlingContext>(context) .BuildServiceProvider(); _context = new BowlingContext(optionsBuilder.Options); _context.Database.EnsureDeleted(); _context.Database.EnsureCreated(); }
public BowlingSystem( IPartyRepository partyContext, IAccountabilityRepository accountabilityContext, IAccountRepository accountContext, BowlingContext bowlingContext) { _partyContext = partyContext; _accountabilityContext = accountabilityContext; _accountContext = accountContext; PrepareGameObjects(); _bowlingContext = bowlingContext; _bowlingContext.AccountabilityTypes.Add(_gameType); _bowlingContext.Units.Add(_scoreUnit); _bowlingContext.PhenomenonTypes.Add(_phenomenonType); _bowlingContext.OakLanes.AddRange(_oakLanes); _bowlingContext.Lanes.AddRange(_lanes); _bowlingContext.SaveChanges(); }
public TeamMembersController(BowlingContext context) { _context = context; }
public GamesController(BowlingContext context) { _context = context; _context.Database.EnsureCreated(); }
public TeamViewComponent(BowlingContext ctx) { context = ctx; }
public YearAveragesController(BowlingContext context) { _context = context; }
public SqlPartyRepository(BowlingContext context) { _context = context; }
public GamesController(BowlingContext context) { _context = context; }
public BowlersController(BowlingContext context) { _context = context; }
public RecordStaticsController(BowlingContext context) { _context = context; }
public SqlAccountabilityRepository(BowlingContext context) { _context = context; }
public HomeController(ILogger <HomeController> logger, BowlingContext ctx) { _logger = logger; context = ctx; }