public ArtistsService( IOptionsMonitor <DatabaseOptions> optionsAccessor, IArtistSlugsService artistSlugsService, BbContext context) { _databaseOptions = optionsAccessor.CurrentValue; _artistSlugsService = artistSlugsService; _context = context; }
protected void SetupDataContext() { var services = new ServiceCollection(); services.AddDbContext <BbContext>(options => { options.ConfigureWarnings(x => x.Ignore(InMemoryEventId.TransactionIgnoredWarning)); options.UseInMemoryDatabase("bejebeje" + Guid.NewGuid().ToString()); }); var serviceProvider = services.BuildServiceProvider(); Context = serviceProvider.GetService <BbContext>(); }
public DataSeederService( BbContext context) { _context = context; }
public AuthorService( BbContext context) { _context = context; }