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(); }