Added normalization for date dimensions in SqlDashboardStorage to ensure consistent grouping for "AddedWhen" and "ChangedWhen" fields. Refactored CatalogsGrid.razor to use custom sort icons and default DxGrid filter row UI, simplifying markup and improving visual consistency. Updated related CSS for sortable headers and filter inputs.
- Added a new Catalogs.razor page with a CatalogsGrid component and navigation link.
- Simplified Dashboard.razor to only show the default dashboard in designer mode; removed catalog grid options.
- Updated dashboard parameter logic to always redirect to "dashboards/default" unless already selected.
Replaced file-based dashboard storage with SQL Server-backed storage using the new SqlDashboardStorage class and TBDD_SMF_CONFIG table. Updated Program.cs to use the new storage and ensure default dashboards are loaded into the database. Simplified DefaultDashboard.xml to remove old items. Added SQL script for the dashboard storage table. Cleaned up unused folder references in the project file. This centralizes dashboard management and supports multi-instance scenarios.
- Add sidebar dashboard navigation and support multiple dashboards
- Extract catalog grid/form logic to reusable CatalogsGrid component
- Add CatalogApiClient and DTOs for catalog CRUD operations
- Define dashboards with JSON data sources (Default, CatalogsGrid)
- Update configuration for dashboard and API endpoints
- Improve styling and imports for modularity and maintainability
Added custom CSS for sortable headers and search inputs. Replaced default filter row inputs with styled DxTextBox components. Set default sort on "Id" column and disabled sorting for action column. Updated grid to use new catalog-grid styles.
Removed several DevExpress Blazor Fluent theme stylesheets and the bootstrap-external.bs5.min.css from index.html. Retained only default Bootstrap, app-specific, and DevExpress Dashboard styles to simplify and standardize application theming.
Switched from old DevExpress Blazor theme and icons to Fluent theme stylesheets in index.html and App.razor. Added @rendermode InteractiveServer to Routes.razor to enable interactive server-side rendering.
Added DevExpress Dashboard to ASP.NET Core API and both Blazor WASM/Server frontends. Configured dashboard storage, sample data source, and API endpoint. Updated Blazor projects with dashboard packages, styles, and a new dashboard page. Navigation and configuration updated to support dashboard integration.
Added new Blazor Server project `DbFirst.BlazorWebApp` with core UI components, pages, and static assets. Updated solution file to include the project. Also added `bootstrap.min.css.map` to support CSS debugging in browser developer tools.
Added comprehensive inline comments (mainly in German) to key files (index.html, Program.cs, App.razor, MainLayout.razor, NavMenu.razor, Catalogs.razor, CatalogApiClient.cs) to clarify their roles and the overall application flow. Updated Home.razor with a clearer heading and intro. Introduced Ablauf.cs, which documents the loading order and responsibilities of each major component. These changes enhance codebase clarity and maintainability, especially for German-speaking developers.
Added CSS classes for better spacing between form and grid.
Wrapped form in .action-panel and grid in .grid-section divs
to enhance visual separation. No functional changes made.
Replaced Bootstrap UI with DevExpress components in Catalogs.razor, including forms and data grid. Added DevExpress.Blazor package, styles, and service registration. Updated _Imports.razor for global DevExpress usage. Modernizes UI and improves user experience.
Refined CORS policy in Program.cs for better security. In development, all origins are allowed. In production, only configured origins are allowed; if none are specified, all cross-origin requests are blocked by default. Switched to Array.Empty<string>() for clarity.
Removed the <ItemGroup> entry for the "Repositories" folder in DbFirst.Domain.csproj. This change only affects the project file and does not delete the folder or its contents from the file system.
Eliminated the catalog service layer by deleting both CatalogService.cs and ICatalogService.cs. This removes all catalog-related CRUD operations, mapping logic, repository interactions, and domain-specific checks. Also removed related comments and TODOs regarding generic services and CQRS.
Refactored IRepository<T> and ICatalogRepository to reside in the DbFirst.Application layer instead of Domain. Updated namespaces, using statements, and all references in services and handlers. Adjusted csproj dependencies to reflect the new structure. Updated comments to clarify Clean Architecture rationale and improved separation of concerns.
Added a generic IRepository<T> interface for common CRUD operations and updated ICatalogRepository to inherit from it, removing redundant methods. Updated CatalogRepository to implement the new interface. Cleaned up DbFirst.Domain.csproj by removing an unused folder reference. These changes improve code reuse and align with clean architecture practices.
Refactor ApplicationDbContext to use a configuration-driven approach for mapping view and column names, enabling dynamic mapping through appsettings.json. Add TableConfigurations classes, update DI registration, and include the necessary options package for configuration binding. This improves maintainability and flexibility for schema changes.
Removed unused and redundant using/import statements from multiple files, including command, repository, and Program.cs. No functional changes; this commit improves code clarity and organization.
- Make CORS policy environment-aware: allow any origin in development, restrict to configured origins in production.
- Add detailed comments in CatalogService.cs and ICatalogRepository.cs discussing generic CRUD services, CQRS with MediatR, and repository interface placement, including both Copilot's and Hakan's perspectives.
- No functional changes to service or repository logic.
Enforce business rules for catalog title changes: only allow CatTitle to be edited when UpdateProcedure permits, with checks in the API, service, handler, and UI. This ensures consistent validation and user experience across backend and frontend.
Enforce immutability of CatTitle on updates: backend now rejects title changes with a BadRequest, and frontend disables the title input field when editing.
Refactored CORS setup to be environment-aware, restricting origins in production and relaxing in development. Added extensive comments and discussion on service and repository layer design, including clean architecture best practices and CQRS/MediatR considerations. No changes to business logic; documentation and intent clarified for maintainers.
Added CatalogUpdateProcedure enum to domain. CatalogWriteDto now includes UpdateProcedure property in both application and BlazorWasm layers. Catalogs.razor form allows users to choose between PRTBMY_CATALOG_UPDATE and PRTBMY_CATALOG_SAVE when editing. Repository, service, and handler layers updated to pass and use the selected procedure. Default remains Update. Updated comments and TODOs for clarity and future refactoring.
Added Copilot comments explaining why a generic repository is unsuitable due to stored procedure complexities and asymmetric CRUD operations. Suggested keeping specialized repositories and extracting helpers for reuse. Also added a TODO to move the interface to the application layer for clean architecture.
Added detailed comments in CatalogService and ICatalogService explaining why a generic CRUD base service or repository is not suitable for this solution, due to entity-specific domain logic and stored procedure usage. Removed the previous Copilot comment from CatalogRepository. No functional changes; updates are for architectural clarity.
Replaced direct service usage in CatalogsController with MediatR-based commands and queries for all CRUD operations. Added command/query and handler classes for Catalog operations. Updated dependency injection to register MediatR and removed ICatalogService. Improved code maintainability and testability by adopting CQRS architecture.
Expanded using directives to support additional dependencies in CatalogRepository.cs. Added a detailed comment explaining why per-entity repository implementations are preferred over a generic CRUD base service in this context, due to unique domain logic and stored procedure requirements. No functional code changes were made.
Refactored dependency injection by introducing AddApplication and AddInfrastructure extension methods for service registration. Moved DbContext and AutoMapper setup out of Program.cs to improve modularity and reusability. Added required NuGet packages to .csproj files.
Introduce CORS configuration using allowed origins from appsettings.json. Updated Program.cs to read allowed origins from configuration and apply them to the CORS policy, defaulting to AllowAnyOrigin if none are specified. Also made minor formatting and comment improvements.
Introduced ExceptionHandlingMiddleware to catch and log unhandled exceptions, returning standardized JSON error responses. Registered the middleware in the request pipeline. Also made minor formatting and comment improvements in Program.cs and ICatalogRepository.cs.
Refactored CatalogApiClient methods to return ApiResult<T> for create, update, and delete operations, enabling more detailed error reporting. Introduced ApiResult<T> and ProblemDetailsDto types, and added logic to parse and display informative error messages. Updated Catalogs.razor to use the new pattern and show user-friendly error feedback. Added necessary using directives.
The Update method now checks if CatTitle is being changed and returns a 400 Bad Request if so. It also returns 404 Not Found if the catalog does not exist before attempting an update. This ensures CatTitle remains immutable during updates.
Configured CORS support with a default policy that allows requests from any origin. Added a TODO to restrict allowed origins using values from appsettings.json in the future.
Added ApplicationDbContext and AutoMapper registrations to the DI container in Program.cs. Included TODO comments to extract these registrations into extension methods for better reuse across projects.
Added a uniqueness check for catalog titles in the creation flow. The service now prevents creating catalogs with duplicate titles by checking for existing entries before insertion. If a duplicate is detected, the API returns a 409 Conflict response. Updated interfaces and repository to support title-based lookups.
Added TODO comments in Program.cs for exception handling middleware, and in CatalogService.cs and ICatalogService.cs for creating a generic service and implementing CQRS with MediatR. No functional changes made.
Added TODO comments in ICatalogRepository and CatalogRepository to suggest adopting a generic repository pattern to reduce code duplication. Also noted the potential move of the interface to the application layer for better adherence to clean architecture principles.
Added a TODO comment in ApplicationDbContext to suggest configuring column names using IConfiguration and appsettings. No functional changes were made.
Added Microsoft.Data.SqlClient using directive to CatalogRepository.cs. Also added a TODO comment suggesting the use of a generic repository pattern to minimize code duplication.
Refactored CatalogRepository to set @GUID as an OUTPUT parameter when calling PRTBMY_CATALOG_UPDATE. Now, after execution, the code checks the returned GUID value and uses it to fetch the updated catalog entry, handling cases where the GUID is null or zero. This ensures the repository returns the correct catalog record as modified by the stored procedure.
Replaced the InsertAsync placeholder with a full implementation that inserts a new VwmyCatalog using the dbo.PRTBMY_CATALOG_INSERT stored procedure. The method sets up SQL parameters, handles the output GUID, and retrieves the inserted catalog from the view. Exceptions are thrown if the insert fails or the catalog cannot be loaded.
Removed ReverseMap from CatalogProfile for one-way mapping. Refactored UpdateAsync in CatalogRepository: eliminated existence check, set @GUID as input only, removed output handling, and simplified return logic.
Removed Upsert endpoint and related service/repository methods. Deleted ExecuteUpsertAsync helper. Insert now throws NotImplementedException as a placeholder. Refactored Delete method in repository; logic unchanged.
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.
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.