Example #1
0
        //新增帖子
        static void CreatePost(int blogid)
        {
            Console.WriteLine("请输入一个帖子名称");
            string title = Console.ReadLine();

            Console.WriteLine("请输入一个帖子内容");
            string content = Console.ReadLine();
            Post   post    = new Models.Post();

            post.Title   = title;
            post.Content = content;
            post.BlogId  = blogid;
            PostBusinessLayer pbl = new BusinessLayer.PostBusinessLayer();

            pbl.Add(post);
        }