Esempio n. 1
0
        public static void ViewAllPosts()
        {
            using (var conn = new NpgsqlConnection(Blog.ConnectionString))
            {
                var database = new Database(conn);
                var service  = new Service(database);
                var posts    = service.GetAllPosts();

                var choosedPost = ChoosePostInterface(posts);
                if (choosedPost != null)
                {
                    Blog.ChoosePost(choosedPost);
                }
            }
        }