feat: implement blog edit functionality with complete CRUD and add GetByIdAsync to BlogService
TaxBaik CI/CD / build-and-deploy (push) Successful in 49s
TaxBaik CI/CD / build-and-deploy (push) Successful in 49s
- Create BlogEdit.razor for editing existing posts - Add admin-page-hero section for consistent navigation - Implement delete functionality with confirmation dialog - Add GetByIdAsync method to BlogService to support entity retrieval by ID - Follow SOLID principles: single responsibility for each component
This commit is contained in:
@@ -9,6 +9,9 @@ using Microsoft.Extensions.Caching.Memory;
|
||||
|
||||
public class BlogService(IBlogPostRepository repository, IMemoryCache memoryCache)
|
||||
{
|
||||
public async Task<BlogPost?> GetByIdAsync(int id, CancellationToken ct = default) =>
|
||||
await repository.GetByIdAsync(id, ct);
|
||||
|
||||
public async Task<BlogPost?> GetBySlugAsync(string slug, CancellationToken ct = default) =>
|
||||
await repository.GetBySlugAsync(slug, ct);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user