@page "/draft" @using LinkDotNet.Blog.Domain @using LinkDotNet.Blog.Infrastructure @using LinkDotNet.Blog.Infrastructure.Persistence @attribute [Authorize] @inject IRepository BlogPostRepository Drafts

Draft Blog Posts

@if (blogPosts.Count > 0) { @for (var i = 0; i < blogPosts.Count; i++) { } } else {

No draft blog posts currently. Create a new blog post

}
@code { private IReadOnlyList blogPosts = PagedList.Empty; protected override async Task OnInitializedAsync() { blogPosts = await BlogPostRepository.GetAllAsync(p => !p.IsPublished, b => b.UpdatedDate); } }