Exemplo n.º 1
0
 public ParkController(IUserSecurityDAO db, IParkGeekDAO parkDAO, IWeatherDAO weatherDAO, ISurveyResultDAO surveyDAO, IHttpContextAccessor httpContext) : base(db, httpContext)
 {
     _parkDAO      = parkDAO;
     _weatherDAO   = weatherDAO;
     _surveyDAO    = surveyDAO;
     _userSecurity = db;
 }
Exemplo n.º 2
0
        public void Initialize()
        {
            _db       = new WeatherSqlDAO(_connectionString);
            _userMgr  = new UserManager(new UserSecurityDAO(_connectionString));
            _natlPark = new NationalParkSqlDAO(_connectionString);
            _tran     = new TransactionScope();

            // adding a new national park (due to DB PK/FK constraints on parkCode to add weather Item)
            _natlPark.AddNewNationalPark(_nationalParkItem);
        }
 // Remember that in order to do dependency injection, we need to add the DAOs in the constructor
 // Otherwise we need to pass in the strings manually
 public HomeController(INatParkDAO natParkDAO, IWeatherDAO weatherDAO)
 {
     this.parkDAO    = natParkDAO;
     this.weatherDAO = weatherDAO;
 }
 public CurrentWeather(IHttpContextAccessor contextAccessor, IWeatherDAO weatherDAO)
 {
     this.contextAccessor = contextAccessor;
     this.weatherDAO      = weatherDAO;
 }
Exemplo n.º 5
0
 public ParksController(IParkDAO parkDAO, IWeatherDAO weatherDAO)
 {
     //saves dependency injected DAO
     this.parkDAO    = parkDAO;
     this.weatherDAO = weatherDAO;
 }
Exemplo n.º 6
0
 public void GetFiveDay(IWeatherDAO dao, string id)
 {
     this.dao        = dao;
     this.Id         = id;
     fiveDayForecast = dao.GetForecast(id);
 }
Exemplo n.º 7
0
 public HomeController(IParkDAO park, IWeatherDAO weather)
 {
     this.parkDAO    = park;
     this.weatherDAO = weather;
 }
 public HomeController(IParkDAO parkDAO, IWeatherDAO weatherDAO, ISurveyResultDAO surveyDAO)
 {
     this.parkDAO    = parkDAO;
     this.weatherDAO = weatherDAO;
     this.surveyDAO  = surveyDAO;
 }
Exemplo n.º 9
0
 public ParkController(IParkDAO dal, IWeatherDAO dal2)
 {
     this.dal  = dal;
     this.dal2 = dal2;
 }
Exemplo n.º 10
0
 public WeatherController(IWeatherDAO weatherDAO)
 {
     this.weatherDAO = weatherDAO;
 }
 public HomeController(IWeatherDAO weatherDb, IUserSecurityDAO userDb, INationalParkDAO db, IHttpContextAccessor httpContext) : base(userDb, httpContext)
 {
     _db        = db;
     _weatherDb = weatherDb;
 }
 public ParksController(IParksDAO parksDAO, IWeatherDAO weatherDAO, IAuthProvider authProvider) : base(authProvider)
 {
     this.ParksDAO   = parksDAO;
     this.WeatherDAO = weatherDAO;
 }
 public HomeController(INationalParkDAO nationalParkDAO, IWeatherDAO weatherDAO, ISurveyDAO surveyDAO)
 {
     this.nationalParkDAO = nationalParkDAO;
     this.weatherDAO      = weatherDAO;
     this.surveyDAO       = surveyDAO;
 }
Exemplo n.º 14
0
 /// <summary>
 /// Constructory
 /// </summary>
 /// <param name="parkDAOParam">An object </param>
 public ParksController(IParkDAO parkDAOParam, IWeatherDAO weatherDAOParam)
 {
     this.parkDao    = parkDAOParam;
     this.weatherDao = weatherDAOParam;
 }
Exemplo n.º 15
0
 public HomeController(INationalParkDAO nationalP, IWeatherDAO weather)
 {
     this.NPD = nationalP;
     this.WD  = weather;
 }
Exemplo n.º 16
0
 public HomeController(IParkDAO parkDao, IWeatherDAO weatherDao)
 {
     this.parkDao    = parkDao;
     this.weatherDao = weatherDao;
 }
Exemplo n.º 17
0
 public ParkDAO(string connectionString)
 {
     weatherDAO            = new DarkSkyDAO();
     this.connectionString = connectionString;
 }
Exemplo n.º 18
0
 public HomeController(IParkDAO parkDAO, IWeatherDAO weatherDAO)
 {
     this.parkDAO    = parkDAO;
     this.weatherDAO = weatherDAO;
 }
 public HomeController(IParkDAO dao, IWeatherDAO weatherDAO)
 {
     this.dao        = dao;
     this.weatherDAO = weatherDAO;
 }