protected static MyReportDbContext CreateDbContext(string dbName = "MyReportDb") { var context = new MyReportDbContext(new DbContextOptionsBuilder<MyReportDbContext>() .UseInMemoryDatabase(databaseName: dbName ?? Guid.NewGuid().ToString()) .Options); return context; }
public ReportService(MyReportDbContext dbContext, IReportSender reportSender) { _dbContext = dbContext; _reportSender = reportSender; }