示例#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;
 }
示例#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;
 }
 public ParksController(IParkDAO parkDAO, IWeatherDAO weatherDAO)
 {
     //saves dependency injected DAO
     this.parkDAO    = parkDAO;
     this.weatherDAO = weatherDAO;
 }
示例#6
0
 public void GetFiveDay(IWeatherDAO dao, string id)
 {
     this.dao        = dao;
     this.Id         = id;
     fiveDayForecast = dao.GetForecast(id);
 }
示例#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;
 }
示例#9
0
 public ParkController(IParkDAO dal, IWeatherDAO dal2)
 {
     this.dal  = dal;
     this.dal2 = dal2;
 }
示例#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;
 }
示例#14
0
 /// <summary>
 /// Constructory
 /// </summary>
 /// <param name="parkDAOParam">An object </param>
 public ParksController(IParkDAO parkDAOParam, IWeatherDAO weatherDAOParam)
 {
     this.parkDao    = parkDAOParam;
     this.weatherDao = weatherDAOParam;
 }
示例#15
0
 public HomeController(INationalParkDAO nationalP, IWeatherDAO weather)
 {
     this.NPD = nationalP;
     this.WD  = weather;
 }
示例#16
0
 public HomeController(IParkDAO parkDao, IWeatherDAO weatherDao)
 {
     this.parkDao    = parkDao;
     this.weatherDao = weatherDao;
 }
示例#17
0
 public ParkDAO(string connectionString)
 {
     weatherDAO            = new DarkSkyDAO();
     this.connectionString = connectionString;
 }
示例#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;
 }