Commit Graph

5 Commits

Author SHA1 Message Date
OlgunR
ccd97fe9d6 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.
2026-01-14 12:50:58 +01:00
OlgunR
ce40abe20f Add VwmyCatalog view entity and update repository usage
Introduce VwmyCatalog as a keyless entity mapped to the VWMY_CATALOG database view. Update ApplicationDbContext to include the new DbSet and configure its mapping. Modify CatalogRepository to query the view instead of the table for GetAllAsync and GetByIdAsync. Add AutoMapper configuration for VwmyCatalog to Catalog. Add the VwmyCatalog entity class.
2026-01-12 17:00:37 +01:00
OlgunR
97eea94090 Update SP-based catalog update to use id route param
Refactor UpdateWithStoredProcedure to accept id from the route and set dto.Guid accordingly. In the repository, use Guid for existence checks instead of CAT_TITLE, and ensure CatTitle is not changed via the SP. Improve error handling to return NotFound when appropriate.
2026-01-12 16:39:21 +01:00
OlgunR
eabf60923d Add SP-based update/delete for Catalogs, new endpoints
Added support for updating and deleting Catalog records via SQL Server stored procedures. Introduced PUT /catalogs/sp and DELETE /catalogs/sp/{id} endpoints in CatalogsController. Extended service and repository interfaces and implementations to handle stored procedure operations. Added Microsoft.Data.SqlClient package for direct SQL execution. Repository checks for record existence before SP calls to prevent unintended behavior.
2026-01-12 12:58:41 +01:00
OlgunR
d312230803 Initial .NET 8 Web API with EF Core Db-First for Catalogs
Set up multi-project solution with DbFirst API, Application, Domain, and Infrastructure layers. Implemented database-first EF Core for the Catalog entity, including domain, DTOs, repository, service, and controller. Configured AutoMapper, DI, Swagger, and project settings. Added .gitattributes and initial configuration files.
2026-01-12 09:42:20 +01:00