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