blog post creation time

pull/318/head
Yunus Emre Kalkan 7 years ago
parent e1e4112e4f
commit 7901638726

@ -10,5 +10,7 @@ namespace Volo.Blogging.Posts
public string Title { get; protected set; }
public string Content { get; set; }
public DateTime CreationTime { get; set; }
}
}

@ -6,4 +6,6 @@
<h2>@Model.Post.Title</h2>
<p>@Model.Post.Content</p>
<p>@Model.Post.Content</p>
<i>Posted to @Model.Blog.Name On @Model.Post.CreationTime</i>

@ -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;
}
}
}
Loading…
Cancel
Save