static void Main(string[] args) { IProjectDAO projectDAO = new ProjectSqlDAO(@"Data Source =.\SQLEXPRESS; Initial Catalog = EmployeeDB; Integrated Security = True"); IEmployeeDAO employeeDAO = new EmployeeSqlDAO(@"Data Source =.\SQLEXPRESS; Initial Catalog = EmployeeDB; Integrated Security = True"); IDepartmentDAO departmentDAO = new DepartmentSqlDAO(@"Data Source =.\SQLEXPRESS; Initial Catalog = EmployeeDB; Integrated Security = True"); ProjectCLI projectCLI = new ProjectCLI(employeeDAO, projectDAO, departmentDAO); projectCLI.RunCLI(); }
static void Main(string[] args) { // Get the connection string from the appsettings.json file IConfigurationBuilder builder = new ConfigurationBuilder() .SetBasePath(Directory.GetCurrentDirectory()) .AddJsonFile("appsettings.json", optional: true, reloadOnChange: true); IConfigurationRoot configuration = builder.Build(); string connectionString = configuration.GetConnectionString("Project"); IProjectDAO projectDAO = null; IEmployeeDAO employeeDAO = null; IDepartmentDAO departmentDAO = null; ProjectCLI projectCLI = new ProjectCLI(employeeDAO, projectDAO, departmentDAO); projectCLI.RunCLI(); }
static void Main(string[] args) { // Get the connection string from the appsettings.json file IConfigurationBuilder builder = new ConfigurationBuilder() .SetBasePath(Directory.GetCurrentDirectory()) .AddJsonFile("appsettings.json", optional: true, reloadOnChange: true); IConfigurationRoot configuration = builder.Build(); string connectionString = configuration.GetConnectionString("Project"); IProjectDAO projectDAO = new ProjectSqlDAO(connectionString); IEmployeeDAO employeeDAO = new EmployeeSqlDAO(connectionString); IDepartmentDAO departmentDAO = new DepartmentSqlDAO(connectionString); ProjectCLI projectCLI = new ProjectCLI(employeeDAO, projectDAO, departmentDAO); projectCLI.Show(); Console.WriteLine("Thank you for using the project organizer"); }