Пример #1
0
        static void Main(string[] args)
        {
            var connectionString = "Server = 127.0.0.1; Port = 5432; Database = bookish; User Id = Bookish; Password = password; ";

            var AccessDB = new AccessDB();
            var books    = AccessDB.FindAllBooks(connectionString);
            var Users    = AccessDB.FindAllUsers(connectionString);

            foreach (var i in books)
            {
                Console.WriteLine($"{i.Title} by {i.Author}");
            }
            foreach (var i in Users)
            {
                Console.WriteLine($"User account: {i.FirstName} {i.Surname} with email {i.Email}");
            }
        }