diff --git a/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/Posts/PostDto.cs b/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/Posts/PostDto.cs index 9c85bc7859..a8d5e2c126 100644 --- a/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/Posts/PostDto.cs +++ b/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/Posts/PostDto.cs @@ -10,5 +10,7 @@ namespace Volo.Blogging.Posts public string Title { get; protected set; } public string Content { get; set; } + + public DateTime CreationTime { get; set; } } } diff --git a/modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Posts/Detail.cshtml b/modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Posts/Detail.cshtml index 9273622bba..ab76fff180 100644 --- a/modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Posts/Detail.cshtml +++ b/modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Posts/Detail.cshtml @@ -6,4 +6,6 @@
@Model.Post.Content
\ No newline at end of file +@Model.Post.Content
+ +Posted to @Model.Blog.Name On @Model.Post.CreationTime \ No newline at end of file diff --git a/modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Posts/Detail.cshtml.cs b/modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Posts/Detail.cshtml.cs index f0f262ea60..bfc49ccb31 100644 --- a/modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Posts/Detail.cshtml.cs +++ b/modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Posts/Detail.cshtml.cs @@ -22,6 +22,8 @@ namespace Volo.Blogging.Pages.Blog.Posts public PostDto Post { get; set; } + public BlogDto Blog { get; set; } + public DetailModel(IPostAppService postAppService, IBlogAppService blogAppService) { _postAppService = postAppService; @@ -32,7 +34,8 @@ namespace Volo.Blogging.Pages.Blog.Posts { var blog = await _blogAppService.GetByShortNameAsync(BlogShortName); - Post = await _postAppService.GetPost(new GetPostInput(){BlogId = blog.Id , Title = PostTitle}); + Post = await _postAppService.GetPost(new GetPostInput {BlogId = blog.Id , Title = PostTitle}); + Blog = blog; } } } \ No newline at end of file