Refactor to use VwmyCatalog as primary catalog entity

Replaced all usage of the Catalog entity with VwmyCatalog across application, domain, and infrastructure layers. Updated AutoMapper profiles, repository interfaces, and service logic to use VwmyCatalog. Removed the obsolete Catalog entity and related mapping profiles. Moved VwmyCatalog to the Domain.Entities namespace and cleaned up project structure. This change simplifies the domain model and eliminates redundant entity definitions.
This commit is contained in:
OlgunR
2026-01-14 15:01:13 +01:00
parent ccd97fe9d6
commit 6caf3a4c07
9 changed files with 47 additions and 80 deletions

View File

@@ -7,7 +7,6 @@
</PropertyGroup>
<ItemGroup>
<Folder Include="DomainEntities\" />
<Folder Include="Repositories\" />
</ItemGroup>

View File

@@ -1,12 +1,18 @@
namespace DbFirst.Domain.DomainEntities;
namespace DbFirst.Domain.Entities;
public class Catalog
public partial class VwmyCatalog
{
public int Guid { get; set; }
public string CatTitle { get; set; } = null!;
public string CatString { get; set; } = null!;
public string AddedWho { get; set; } = null!;
public DateTime AddedWhen { get; set; }
public string? ChangedWho { get; set; }
public DateTime? ChangedWhen { get; set; }
}

View File

@@ -1,14 +1,14 @@
using DbFirst.Domain.DomainEntities;
using DbFirst.Domain.Entities;
namespace DbFirst.Domain.Repositories;
public interface ICatalogRepository
{
Task<List<Catalog>> GetAllAsync(CancellationToken cancellationToken = default);
Task<Catalog?> GetByIdAsync(int id, CancellationToken cancellationToken = default);
Task<Catalog> AddAsync(Catalog catalog, CancellationToken cancellationToken = default);
Task<bool> UpdateAsync(int id, Catalog catalog, CancellationToken cancellationToken = default);
Task<Catalog?> UpdateWithStoredProcedureAsync(Catalog catalog, CancellationToken cancellationToken = default);
Task<List<VwmyCatalog>> GetAllAsync(CancellationToken cancellationToken = default);
Task<VwmyCatalog?> GetByIdAsync(int id, CancellationToken cancellationToken = default);
Task<VwmyCatalog> AddAsync(VwmyCatalog catalog, CancellationToken cancellationToken = default);
Task<bool> UpdateAsync(int id, VwmyCatalog catalog, CancellationToken cancellationToken = default);
Task<VwmyCatalog?> UpdateWithStoredProcedureAsync(VwmyCatalog catalog, CancellationToken cancellationToken = default);
Task<bool> DeleteAsync(int id, CancellationToken cancellationToken = default);
Task<bool> DeleteWithStoredProcedureAsync(int id, CancellationToken cancellationToken = default);
}