Ejemplo n.º 1
0
 private static Post CreatePost(User user, Group group)
 {
     return new Post()
         {
             PostId = Guid.NewGuid(),
             Url = "test",
             Title = "测试文章",
             Content = "<p>这是文章的正文内容.</p>",
             Description = "<p>这是文章的描述内容.</p>",
             PubAdmin = user,
             PubDate = DateTime.Now,
             Group = group,
             Tags = new List<Tag> {new Tag {Name = "Test Tag"}},
             Categorys = new List<Category>
                 {
                     new Category
                         {
                             CategoryId = Guid.NewGuid(),
                             Name = "default",
                             Url = "default",
                             Description = "这是一个默认分类.",
                             OrderId = 1,
                             Group = group,
                         }
                 },
         };
 }
Ejemplo n.º 2
0
 private static Post CreatePost(User user, Group group)
 {
     return new Post()
         {
             PostId = Guid.NewGuid(),
             Url = "test",
             Title = "Test article",
             Content = "<p>This is content.</p>",
             Description = "<p>This is description.</p>",
             CreateUser = user.UserName,
             PubDate = DateTime.Now,
             Group = group,
             Tags = new List<Tag> {new Tag {Name = "Test Tag"}},
         };
 }