예제 #1
0
        protected static MyContactDbContext CreateDbContext(string dbName = "MyContactDb")
        {
            var context = new MyContactDbContext(new DbContextOptionsBuilder <MyContactDbContext>()
                                                 .UseInMemoryDatabase(databaseName: dbName ?? Guid.NewGuid().ToString())
                                                 .Options);

            return(context);
        }
예제 #2
0
 public PersonInfoService(MyContactDbContext dbContext)
 {
     _dbContext = dbContext;
 }
예제 #3
0
 public PersonService(MyContactDbContext dbContext,
                      IReportSender reportSender)
 {
     this._dbContext    = dbContext;
     this._reportSender = reportSender;
 }