/// <summary> /// Constructor adds items to the top-level menu /// </summary> public WorldDBMenu(ICountryDAO countryDAO) : base() { // TODO 02a: Change this constructor to require country dao // TODO 02c: Assign the Interfaces to protected variables so we can use them later this.countryDAO = countryDAO; }
public FacadeBase() { _airlineDAO = new AirlineDAOMSSQL(); _countryDAO = new CountryDAOMSSQL(); _customerDAO = new CustomerDAOMSSQL(); _flightDAO = new FlightDAOMSSQL(); _ticketDAO = new TicketDAOMSSQL(); }
public FacadeBase() { this._airlineDAO = new AirlineDAOMSSQL(); this._countryDAO = new CountryDAOMSQQL(); this._customerDAO = new CustomerDAOMSSQL(); this._flightDAO = new FlightDAOMSSQL(); this._ticketDAO = new TIcketDAOMSSQL(); }
public FacadeBase(IAirlineDAO airlineDAO, ICountryDAO countryDAO, ICustomerDAO customerDAO, IFlightDAO flightDAO, ITicketDAO ticketDAO, IAdministratorDAO administratorDAO) { _airlineDAO = airlineDAO; _countryDAO = countryDAO; _customerDAO = customerDAO; _flightDAO = flightDAO; _ticketDAO = ticketDAO; _administratorDAO = administratorDAO; }
protected FacadeBase(bool test) { _airlineDAO = new AirlineCompany(); _countryDAO = new Country(); _customerDAO = customerDAO; _adminDAO = adminDAO; _user = user; _flightDAO = flightDAO; _ticketDAO = ticketDAO; }
public FacadeBase() { _adminDAO = new AdministratorDAOMSSQL(); _airlineDAO = new AirlineDAOMSSQL(); _customerDAO = new CustomerDAOMSSQL(); _userDAO = new UserDAOMSSQL(); _flightDAO = new FlightDAOMSSQL(); _ticketDAO = new TicketDAOMSSQL(); _countryDAO = new CountryDAOMSSQL(); _backgroundDAO = new MaintenanceDAOMSSQL(); }
protected FacadeBase() { _airlineDAO = new AirlineDAOPGSQL(); _countryDAO = new CountryDAOPGSQL(); _customerDAO = new CustomerDAOPGSQL(); _adminDAO = new AdminDAOPGSQL(); _userDAO = new UserDAOPGSQL(); _flightDAO = new FlightDAOPGSQL(); _ticketDAO = new TicketDAOPGSQL(); _flightsTicketsHistoryDAO = new FlightsTicketsHistoryDAOPGSQL(); }
public FacadeBase() { _airlineDAO = new AirlineDAO(); _countryDAO = new CountryDAO(); _customerDAO = new CustomerDAO(); _flightDAO = new FlightDAO(); _ticketDAO = new TicketDAO(); _userRoleDAO = new UserRoleDAO(); _userRepositoryDAO = new UserRepositoryDAO(); _adminDAO = new AdminDAO(); }
public FacadeBase(bool testMode = false) { _ticketDAO = new TicketDAOMSSQL(testMode); _customerDAO = new CustomerDAOMSSQL(testMode); _flightDAO = new FlightDAOMSSQL(testMode); _countryDAO = new CountryDAOMSSQL(testMode); log.Debug($"creating airlineDAO from type AirlineDAOMSSQL, testMode = {testMode}"); _airlineDAO = new AirlineDAOMSSQL(testMode); log.Debug("AirlineDAOMSSQL created successfully"); }
public FacadeBase(bool testMode) { GlobalConfig.GetConfiguration(testMode); _airlineDAO = new AirlineDAOPGSQL(); _countryDAO = new CountryDAOPGSQL(); _customerDAO = new CustomerDAOPGSQL(); _adminDAO = new AdminDAOPGSQL(); _userDAO = new UserDAOPGSQL(); _flightDAO = new FlightDAOPGSQL(); _ticketDAO = new TicketDAOPGSQL(); }
static void Main(string[] args) { //IConfigurationBuilder builder = new ConfigurationBuilder() // .SetBasePath(Directory.GetCurrentDirectory()) // .AddJsonFile("appsettings.json", optional: true, reloadOnChange: true); //IConfigurationRoot configuration = builder.Build(); //string connectionString = configuration.GetConnectionString("World"); ICityDAO cityDAO = null; ICountryDAO countryDAO = null; ILanguageDAO languageDAO = null; WorldGeographyCLI cli = new WorldGeographyCLI(cityDAO, countryDAO, languageDAO); cli.RunCLI(); }
public FacadeBase() { __airLineDAO = new AirLineDAOMSSQL(); _airLineDAO = __airLineDAO; __countryDAO = new CountryDAOMSSQL(); _countryDAO = __countryDAO; __customerDAO = new CustomerDAOMSSQL(); _customerDAO = __customerDAO; __flightDAO = new FlightDAOMSSQL(); _flightDAO = __flightDAO; __ticketDAO = new TicketDAOMSSQL(); _ticketDAO = __ticketDAO; __flightStatusDAO = new FlightStatusDAOMSSQL(); _flightStatusDAO = __flightStatusDAO; }
public void SetUp() { transaction = new TransactionScope(); DALFactory factory = DALFactory.GetInstance(); db = factory.CreateDatabase(); dao = factory.CreateCountryDAO(db); country = new Country { Id = 1, Name = "Österreich" }; runDbCommands(db, new List<string> { "SET FOREIGN_KEY_CHECKS=0", "DELETE FROM `country`", "INSERT INTO `country` VALUES (1, 'Österreich')", "INSERT INTO `country` VALUES (2, 'Belgien')" }); }
static void Main(string[] args) { // Use this as is, it will allow you access to the data in appsettings.json file IConfigurationBuilder builder = new ConfigurationBuilder() .SetBasePath(Directory.GetCurrentDirectory()) .AddJsonFile("appsettings.json", optional: true, reloadOnChange: true); IConfigurationRoot configuration = builder.Build(); // Replace world with the key name used for your connection string in the appsettings.json file string connectionString = configuration.GetConnectionString("World"); ICityDAO cityDAO = new CitySqlDAO(connectionString); ICountryDAO countryDAO = null; ILanguageDAO languageDAO = new LanguageSqlDAO(connectionString); WorldGeographyCLI cli = new WorldGeographyCLI(cityDAO, countryDAO, languageDAO); cli.RunCLI(); }
/// <summary> /// Constructor adds items to the top-level menu /// </summary> public WorldDBMenu(ICountryDAO countryDAO) { // TODO 05a: Change this constructor to require country dao // TODO 15a: Change this constructor to require country-language dao // TODO 05d: Assign the Interfaces to protected variables so we can use them later this.countryDAO = countryDAO; // Add options to this menu AddOption("List Countries", ListCountries) .AddOption("List Countries on a continent", ListCountriesForContinent) .AddOption("Select a country", SelectACountry) .AddOption("Quit", Exit); Configure(cfg => { cfg.ItemForegroundColor = ConsoleColor.Yellow; cfg.SelectedItemForegroundColor = ConsoleColor.Green; }); }
public UserBO(IUserDAO userDao, ICountryDAO countryDao, IMappingEngine mapper) { userDAO = userDao; countryDAO = countryDao; Mapper = mapper; }
// DI: Step 2 - Add any necessary interfaces as parameters only if needed in this controller public WorldController(ICountryDAO countryDao, ICityDAO cityDao) { _countryDao = countryDao; _cityDao = cityDao; }
// TODO 02 (Controller): Derive the city controller from AppController so we have access to authProvider // Note that we have to inject an IAuthProvider and pass it to the base contructor public CityController(ICityDAO cityDAO, ICountryDAO countryDAO, IAuthProvider authProvider) : base(authProvider) { this.cityDAO = cityDAO; this.countryDAO = countryDAO; }
public WorldController(ICountryDAO countryDAL, ICityDAO cityDAL) { this.countryDAL = countryDAL; this.cityDAL = cityDAL; }
public CountryController(ICityDAO cityDao, ICountryDAO countryDao, ILanguageDAO languageDao) { this.cityDao = cityDao; this.countryDao = countryDao; this.languageDao = languageDao; }
public CountryManager() { _CountryDAOLinq = new CountryDAOLinq(); }
public CityController(ICityDAO cityDAO, ICountryDAO countryDAO) { this.cityDAO = cityDAO; this.countryDAO = countryDAO; }
public Menu(ICurrencyDAO currencyDAO, ICountryDAO countryDAO, IHistoryDAO historyDAO) { this.currencyDAO = currencyDAO; this.countryDAO = countryDAO; this.historyDAO = historyDAO; }
public CountryController(ICountryDAO countryDAO) { this.countryDAO = countryDAO; }
public WorldGeographyCLI(ICityDAO cityDAO, ICountryDAO countryDAO, ILanguageDAO languageDAO) { this.cityDAO = cityDAO; this.languageDAO = languageDAO; this.countryDAO = countryDAO; }
public CountryService(ICountryDAO dao) { this.dao = dao; }
public WorldController(ICountryDAO countryDao, ICityDAO cityDao) { this.countryDao = countryDao; this.cityDao = cityDao; }
/// <summary> /// Constructor adds items to the top-level menu /// </summary> public CountryMenu(Country country, ICityDAO cityDAO, ICountryDAO countryDAO, ILanguageDAO languageDAO) : base(cityDAO, countryDAO, languageDAO) { // Save the country (which will be used for all country queries this.country = country; }
/// <summary> /// Constructor adds items to the top-level menu /// </summary> public WorldDBMenu(ICityDAO cityDAO, ICountryDAO countryDAO, ILanguageDAO languageDAO) : base() { this.cityDAO = cityDAO; this.languageDAO = languageDAO; this.countryDAO = countryDAO; }
public CountryController(ICountryDAO countryDao) { this.countryDao = countryDao; }