-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
alainosorio alicunde.retailer (PTANetBackMVC) #14
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Added essential configuration and setup files: - .dockerignore to exclude unnecessary files from Docker builds. - .gitattributes to manage line endings and diff behaviors. - .gitignore to ignore common development tool files. - Visual Studio solution file for project structure. - GitHub Actions workflow for automated builds. - appsettings.json and appsettings.Development.json for configuration. - Dockerfile for multi-stage Docker builds. - Microservice.csproj for project definition and dependencies. - Microservice.http for HTTP request examples. - Program.cs for main application logic. - launchSettings.json for launch profiles.
- Refactored data processing functions for better readability. - Optimized algorithm to reduce runtime complexity. - Updated unit tests to cover new edge cases. - Fixed minor bugs in data validation logic. - Improved error handling and logging for debugging.
Added new projects `Retailer.Storage.Sqlserver` and `Retailer.Storage.Service` to the solution. Updated `docker-compose` files to configure new services. Introduced `SyncCommand` and `SyncCommandHandler` for synchronization logic. Updated `GlobalUsing.cs` with new global usings. Added project references and package dependencies in `Retailer.Service.csproj` and `Retailer.csproj`. Implemented `StorageService` and `RetailerDbContext` for database operations. Created migration files for `RetailerDbContext`. Updated `Program.cs` and `Services.cs` to configure the database context and service registrations.
Updated GlobalUsing.cs to include Retailer.Service.Query and AutoMapper. Modified IRetailerService.cs to change GetRetailerById parameter type to string and removed CreateRetailer method. Added GetByIdQuery.cs with GetByIdQuery and GetByIdQueryHandler. Updated Retailer.Service.csproj to remove unused folder reference and update package references. Implemented GetRetailerById in RetailerService.cs using MediatR. Updated IStorageService.cs to include GetRetailerById method. Updated Retailer.Storage.Service.csproj to remove unused package reference. Implemented GetRetailerById and refactored Sync method in StorageService.cs. Upgraded testing packages in Retailer.UnitTest.csproj. Added GET request for retrieving retailer by ID in Retailer.http. Modified MapGet method in Get.cs for api/retailers/{id} endpoint. Added AutoMapper configuration in Services.cs.
Removed Retailer.UnitTest project from solution. Added global using directives for common namespaces. Updated Retailer.Service.UnitTest.csproj with new package references and project dependencies. Introduced StorageServiceTests class with a test for GetRetailerById method. Updated Retailer.Storage.Sqlserver.csproj by removing unused package references. Made Retails property in RetailerDbContext virtual for better testability.
- Updated `GlobalUsing.cs` to include a global using directive for `Microsoft.Data.SqlClient`. - Modified `Probes.cs` to remove a TODO comment and add `SqlServerHealthCheck` class implementing `IHealthCheck`. - Updated `Services.cs` to register `SqlServerHealthCheck` with the tag "readiness" and name "sqlserver_readyness".
- Updated `GlobalUsing.cs` to include `Microsoft.Extensions.Caching.Distributed` and `System.Text.Json`. - Modified `RetailerService` constructor to include `IDistributedCache` and updated `GetRetailerById` to use caching. - Updated `SqlServerHealthCheck` to use `IConfiguration` for connection string. - Changed `ConfigureRedis` to use a different config section for Redis URL and reordered health checks, including SQL Server readiness check.
- Updated `docker-compose.override.yml` to include a new Redis service with the latest Redis image, port 6379 binding, and a `redis_data` volume. - Added global using directives for `Refit`, `Retailer.Client`, and `Retailer.Client.Model` in `GlobalUsing.cs`. - Changed namespaces in `IApiService.cs` and `IRetailerService.cs` from `Retailer.Service` to `Retailer.Client`. Added methods for syncing retailers and getting a retailer by ID in `IRetailerService`. - Added `Refit` package reference (v7.1.2) to `Retailer.Client.csproj`. - Added JWT Bearer authentication and authorization services in `Program.cs`. - Added `Microsoft.AspNetCore.Authentication.JwtBearer` package reference (v9.0.0-preview.7.24406.2) to `Retailer.csproj`. - Updated `Retailer.http` to include a new JWT token and authorization headers. - Allowed anonymous access to `GetRetailerById` endpoint in `Get.cs`. - Included middleware for authentication and authorization in `App.cs`. - Added JWT Bearer authentication settings in `appsettings.Development.json`.
Updated the GitHub Actions workflow file `dotnet.yml` to specify `./src` as the working directory for `dotnet restore`, `dotnet build`, and `dotnet test` commands. This ensures that these commands are executed within the correct directory where the project files are located, allowing them to locate necessary files and dependencies.
- Added `System.Text.Json` v9.0.0-preview.7.24405.7 to `Retailer.Client.csproj` for high-performance JSON handling. - Added `Azure.Identity` v1.13.0-beta.1 to `Retailer.Storage.Sqlserver.csproj` for Azure AD token authentication. - Added `System.Drawing.Common` v9.0.0-preview.7.24405.4 to `Retailer.csproj` for GDI+ graphics functionality.
- Added `README-DETAILS.md` with technical test instructions. - Updated `README.md` with new project description and removed old test instructions. - Added `image.png` for the code diagram in `README.md`. - Added `GetRetailerById` method to `IRetailerService` interface. - Made minor formatting changes in `SyncCommand.cs`, `RetailerService.cs`, `StorageService.cs`, and `Probes.cs`. - Updated configuration methods in `Program.cs` and `Services.cs`. - Added log statements in `Get.cs` and `Post.cs` for retailer retrieval and sync completion.
Updated README.md to include steps for running database migrations. Enhanced Retailer.Storage.Sqlserver.csproj with EF Core packages and tools. Updated Retailer.csproj to include EF Core packages for SQL Server.
alainosorio
changed the title
alain osorio alicunde.retailer (PTANetBackMVC)
alainosorio alicunde.retailer (PTANetBackMVC)
Sep 3, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Alicunde.Retailer
Description
Tech Stack
This solution does not include Swagger, but you can view the API documentation at http://localhost:9080/openapi/v1.json.
Microsoft has decided to discontinue support for Swagger in .NET 9.
For more details and alternatives, refer to the following link: dotnet/aspnetcore#54599