Refactor DTOs, add Blazor WASM frontend, enable CORS
- Split `CatalogDto` into `CatalogReadDto` and `CatalogWriteDto` for clear separation of read/write operations in both backend and frontend. - Updated API controllers, services, and AutoMapper profiles to use new DTOs; ensured audit fields are set in service layer. - Enabled CORS in the API project to support Blazor WASM frontend. - Added new Blazor WebAssembly project (`DbFirst.BlazorWasm`) with catalog management UI, API client, Bootstrap v5.1.0 styling, and configuration-driven API base URL. - Included `bootstrap.min.css` and its source map for frontend styling and easier debugging. - Updated solution file to include new project and support multiple build configurations. - Result: improved API design, clean DTO separation, and a modern interactive frontend for catalog management.
This commit is contained in:
12
DbFirst.BlazorWasm/Models/CatalogReadDto.cs
Normal file
12
DbFirst.BlazorWasm/Models/CatalogReadDto.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
namespace DbFirst.BlazorWasm.Models;
|
||||
|
||||
public class CatalogReadDto
|
||||
{
|
||||
public int Guid { get; set; }
|
||||
public string CatTitle { get; set; } = string.Empty;
|
||||
public string CatString { get; set; } = string.Empty;
|
||||
public string AddedWho { get; set; } = string.Empty;
|
||||
public DateTime AddedWhen { get; set; }
|
||||
public string? ChangedWho { get; set; }
|
||||
public DateTime? ChangedWhen { get; set; }
|
||||
}
|
||||
7
DbFirst.BlazorWasm/Models/CatalogWriteDto.cs
Normal file
7
DbFirst.BlazorWasm/Models/CatalogWriteDto.cs
Normal file
@@ -0,0 +1,7 @@
|
||||
namespace DbFirst.BlazorWasm.Models;
|
||||
|
||||
public class CatalogWriteDto
|
||||
{
|
||||
public string CatTitle { get; set; } = string.Empty;
|
||||
public string CatString { get; set; } = string.Empty;
|
||||
}
|
||||
Reference in New Issue
Block a user