// The constructor used for unit tests to fake a db public DistrictController(ITerritoryDb db) { _db = db; }
// The constructor will execute when the app is run on a web server with SQL Server public DistrictController() { _db = new TerritoryDb(); }
// The constructor used for unit tests to fake a db public PersonController(ITerritoryDb db) { _db = db; }
// The constructor will execute when the app is run on a web server with SQL Server public PersonController() { _db = new TerritoryDb(); }
public PersonsController(ITerritoryDb db, IAddressProvider addressProvider) { _db = db; _addresProviderTool = new AddressProviderTool(addressProvider); }
// The constructor used for unit tests to fake a db public PersonsController(ITerritoryDb db) : this(db, new KrakAddressProvider()) { }