public static PostgresDAO Instance() { if (_instance == null) { _instance = new PostgresDAO(); } return(_instance); }
static void Main(string[] args) { // Initialise postgres DAO IPostingsDAO DAO = PostgresDAO.Instance(); // Query database for responses var student = new StudentController("Harry", 100.0m, "Undergraduate", DAO); var result = student.search(); // Output the response Console.WriteLine(student.getView()); }