Esempio n. 1
0
        protected static MyReportDbContext CreateDbContext(string dbName = "MyReportDb")
        {
            var context = new MyReportDbContext(new DbContextOptionsBuilder<MyReportDbContext>()
            .UseInMemoryDatabase(databaseName: dbName ?? Guid.NewGuid().ToString())
            .Options);

            return context;
        }
Esempio n. 2
0
 public ReportService(MyReportDbContext dbContext,
                      IReportSender reportSender)
 {
     _dbContext    = dbContext;
     _reportSender = reportSender;
 }