コード例 #1
0
 // The constructor used for unit tests to fake a db
 public DistrictController(ITerritoryDb db)
 {
     _db = db;
 }
コード例 #2
0
 // The constructor will execute when the app is run on a web server with SQL Server
 public DistrictController()
 {
     _db = new TerritoryDb();
 }
コード例 #3
0
 // The constructor used for unit tests to fake a db
 public PersonController(ITerritoryDb db)
 {
     _db = db;
 }
コード例 #4
0
 // The constructor will execute when the app is run on a web server with SQL Server
 public PersonController()
 {
     _db = new TerritoryDb();
 }
コード例 #5
0
 public PersonsController(ITerritoryDb db, IAddressProvider addressProvider)
 {
     _db = db;
     _addresProviderTool = new AddressProviderTool(addressProvider);
 }
コード例 #6
0
 // The constructor used for unit tests to fake a db
 public PersonsController(ITerritoryDb db)
     : this(db, new KrakAddressProvider())
 {
 }