Esempio n. 1
0
 public static PostgresDAO Instance()
 {
     if (_instance == null)
     {
         _instance = new PostgresDAO();
     }
     return(_instance);
 }
Esempio n. 2
0
        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());
        }