Example #1
0
        //增加--交互
        static void createBlog()
        {
            Console.WriteLine("请输入一个博客名称");
            string name = Console.ReadLine();
            Blog   blog = new Blog();

            blog.Name = name;
            BloBussinessLayer bbl = new BloBussinessLayer();

            bbl.Add(blog);
        }
Example #2
0
        //增加
        static void createClassName()
        {
            Console.WriteLine("输入一个班级名称");
            string    name = Console.ReadLine();
            ClassName CN   = new ClassName();

            CN.Name = name;
            BloBussinessLayer bbl = new BloBussinessLayer();

            bbl.Add(CN);
        }
Example #3
0
        //新增帖子
        static void createPost(int blogId)
        {
            Console.WriteLine("请创建新帖子:");
            string title = Console.ReadLine();

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

            post.BlogId  = blogId;
            post.Title   = title;
            post.Content = content;
            BloBussinessLayer bbl = new BloBussinessLayer();

            bbl.Add(post);
        }