public StatsController() { this.connectionString = ConfigurationManager.ConnectionStrings["dataSource"].ConnectionString; this.logPath = ConfigurationManager.AppSettings["relative"]; linkDAO = new EnemyItemDAO(connectionString, logPath); iDAO = new ItemDAO(connectionString, logPath); eDAO = new EnemyDAO(connectionString, logPath); }
/// <summary> /// gathering information for global variables, instantiating ItemDAO with newly aquired connectionString, and logPath. /// Setting Logger FilePath /// </summary> public ItemController() { connectionString = ConfigurationManager.ConnectionStrings["dataSource"].ConnectionString; logPath = Path.Combine(Path.GetDirectoryName(System.Web.HttpContext.Current.Server.MapPath("~")), ConfigurationManager.AppSettings["relative"]); Logger.logPath = logPath; iDAO = new ItemDAO(connectionString, logPath); linkDAO = new EnemyItemDAO(connectionString, logPath); eDAO = new EnemyDAO(connectionString, logPath); }