From 87031d2a0ac94bfbb20b02cddbafeb4987b7d3f0 Mon Sep 17 00:00:00 2001 From: TekH Date: Fri, 16 Jan 2026 13:34:23 +0100 Subject: [PATCH] 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. --- DbFirst.API/Program.cs | 2 ++ DbFirst.Application/Catalogs/CatalogService.cs | 2 ++ DbFirst.Application/Catalogs/ICatalogService.cs | 1 + 3 files changed, 5 insertions(+) diff --git a/DbFirst.API/Program.cs b/DbFirst.API/Program.cs index c406c41..aea4bfd 100644 --- a/DbFirst.API/Program.cs +++ b/DbFirst.API/Program.cs @@ -4,6 +4,8 @@ using DbFirst.Infrastructure; using DbFirst.Infrastructure.Repositories; using Microsoft.EntityFrameworkCore; +//TODO: create and add exception handling middleware + var builder = WebApplication.CreateBuilder(args); // Add services to the container. diff --git a/DbFirst.Application/Catalogs/CatalogService.cs b/DbFirst.Application/Catalogs/CatalogService.cs index c2263da..03bcf8e 100644 --- a/DbFirst.Application/Catalogs/CatalogService.cs +++ b/DbFirst.Application/Catalogs/CatalogService.cs @@ -4,6 +4,8 @@ using DbFirst.Domain.Entities; namespace DbFirst.Application.Catalogs; +//TODO: create generic service to reduce code duplication +//TODO: implement CQRS pattern with MediatR public class CatalogService : ICatalogService { private readonly ICatalogRepository _repository; diff --git a/DbFirst.Application/Catalogs/ICatalogService.cs b/DbFirst.Application/Catalogs/ICatalogService.cs index f7bc50f..47538fb 100644 --- a/DbFirst.Application/Catalogs/ICatalogService.cs +++ b/DbFirst.Application/Catalogs/ICatalogService.cs @@ -1,5 +1,6 @@ namespace DbFirst.Application.Catalogs; +//TODO: create generic service to reduce code duplication public interface ICatalogService { Task> GetAllAsync(CancellationToken cancellationToken = default);