コード例 #1
0
ファイル: ArtistsService.cs プロジェクト: JwanKhalaf/Bejebeje
 public ArtistsService(
     IOptionsMonitor <DatabaseOptions> optionsAccessor,
     IArtistSlugsService artistSlugsService,
     BbContext context)
 {
     _databaseOptions    = optionsAccessor.CurrentValue;
     _artistSlugsService = artistSlugsService;
     _context            = context;
 }
コード例 #2
0
        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>();
        }
コード例 #3
0
 public DataSeederService(
     BbContext context)
 {
     _context = context;
 }
コード例 #4
0
ファイル: AuthorService.cs プロジェクト: JwanKhalaf/Bejebeje
 public AuthorService(
     BbContext context)
 {
     _context = context;
 }