Refactor catalog CRUD to use stored procedures only

Removed direct usage of TbmyCatalog entity and DbSet. All create, update, and delete operations now use stored procedures. Entity lookups and mappings are performed via the VwmyCatalog view. Updated AutoMapper profile and DbContext configuration accordingly. Catalog creation now sets ChangedWho/ChangedWhen to "system" and current UTC time.
This commit is contained in:
OlgunR
2026-01-14 12:50:58 +01:00
parent 6f3c0e33fa
commit ccd97fe9d6
5 changed files with 51 additions and 108 deletions

View File

@@ -32,8 +32,8 @@ public class CatalogService : ICatalogService
var domainItem = _mapper.Map<Catalog>(dto);
domainItem.AddedWho = "system";
domainItem.AddedWhen = DateTime.UtcNow;
domainItem.ChangedWho = null;
domainItem.ChangedWhen = null;
domainItem.ChangedWho = "system";
domainItem.ChangedWhen = DateTime.UtcNow;
var created = await _repository.AddAsync(domainItem, cancellationToken);
return _mapper.Map<CatalogReadDto>(created);