Add TODOs for middleware, generic service, and CQRS
Added TODO comments in Program.cs for exception handling middleware, and in CatalogService.cs and ICatalogService.cs for creating a generic service and implementing CQRS with MediatR. No functional changes made.
This commit is contained in:
@@ -4,6 +4,8 @@ using DbFirst.Infrastructure;
|
|||||||
using DbFirst.Infrastructure.Repositories;
|
using DbFirst.Infrastructure.Repositories;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
|
||||||
|
//TODO: create and add exception handling middleware
|
||||||
|
|
||||||
var builder = WebApplication.CreateBuilder(args);
|
var builder = WebApplication.CreateBuilder(args);
|
||||||
|
|
||||||
// Add services to the container.
|
// Add services to the container.
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ using DbFirst.Domain.Entities;
|
|||||||
|
|
||||||
namespace DbFirst.Application.Catalogs;
|
namespace DbFirst.Application.Catalogs;
|
||||||
|
|
||||||
|
//TODO: create generic service to reduce code duplication
|
||||||
|
//TODO: implement CQRS pattern with MediatR
|
||||||
public class CatalogService : ICatalogService
|
public class CatalogService : ICatalogService
|
||||||
{
|
{
|
||||||
private readonly ICatalogRepository _repository;
|
private readonly ICatalogRepository _repository;
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
namespace DbFirst.Application.Catalogs;
|
namespace DbFirst.Application.Catalogs;
|
||||||
|
|
||||||
|
//TODO: create generic service to reduce code duplication
|
||||||
public interface ICatalogService
|
public interface ICatalogService
|
||||||
{
|
{
|
||||||
Task<List<CatalogReadDto>> GetAllAsync(CancellationToken cancellationToken = default);
|
Task<List<CatalogReadDto>> GetAllAsync(CancellationToken cancellationToken = default);
|
||||||
|
|||||||
Reference in New Issue
Block a user