suppr all 'var' and Models.xxx. And added 's' at the end of all directories endpoints

This commit is contained in:
2025-11-17 20:49:12 +01:00
parent 20bbccf883
commit 6dba61f742
45 changed files with 141 additions and 114 deletions

View File

@@ -2,9 +2,9 @@
using Microsoft.EntityFrameworkCore;
using PyroFetes.DTO.Product.Request;
using PyroFetes.DTO.Product.Response;
using PyroFetes.DTO.PurchaseProduct.Response;
using PyroFetes.Models;
namespace PyroFetes.Endpoints.Product;
namespace PyroFetes.Endpoints.Products;
public class PatchProductMinimalStockEndpoint(PyroFetesDbContext database)
: Endpoint<PatchProductMinimalStockDto, GetProductDto>
@@ -17,7 +17,7 @@ public class PatchProductMinimalStockEndpoint(PyroFetesDbContext database)
public override async Task HandleAsync(PatchProductMinimalStockDto req, CancellationToken ct)
{
var product = await database.Products.SingleOrDefaultAsync(po => po.Id == req.Id, ct);
Product? product = await database.Products.SingleOrDefaultAsync(po => po.Id == req.Id, ct);
if (product == null)
{
await Send.NotFoundAsync(ct);