static void Main() { AppSettings appSettings = new AppSettings() { URL = "database-1.cwocrrmlsxcx.us-east-1.rds.amazonaws.com", Port = "5432", UserName = "******", Password = "******", DatabaseName = "test1" }; PHPConext pHPConext = new PHPConext(appSettings); try { pHPConext.Database.EnsureCreated(); pHPConext.SaveChanges(); Console.WriteLine("DB Created"); } catch (Exception ex) { Console.WriteLine(ex.Message); } PHPRepo pHPRepo = new PHPRepo(pHPConext); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new Login(pHPRepo)); }
static void Main(string[] args) { AppSettings appSettings = new AppSettings() { URL = "database-1.cwocrrmlsxcx.us-east-1.rds.amazonaws.com", Port = "5432", UserName = "******", Password = "******", DatabaseName = "test1" }; PHPConext pHPConext = new PHPConext(appSettings); try { pHPConext.Database.EnsureCreated(); pHPConext.SaveChanges(); Console.WriteLine("DB Created"); } catch (Exception ex) { Console.WriteLine(ex.Message); } PHPRepo pHPRepo = new PHPRepo(pHPConext); Employees employees = new Employees(pHPRepo); Products products = new Products(pHPRepo); Sales sales = new Sales(pHPRepo); while (true) { Console.WriteLine("Select Page : "); Console.WriteLine("1 : Employees "); Console.WriteLine("2 : Products "); Console.WriteLine("3 : Sales"); string selection = Console.ReadLine(); switch (selection) { case "1": employees.Intialise(); break; case "2": products.Intialise(); break; case "3": sales.Intialise(); break; default: Console.WriteLine("please give valid input"); break; } Console.WriteLine("Press enter to continue"); Console.ReadLine(); } }