A .NET application for mapping and synchronizing data between SQL Server databases and Odoo/PostgreSQL databases. This tool supports dynamic mapping of tables and fields, allowing for flexible data integration between systems.
- Map data from SQL Server to Odoo PostgreSQL databases
- Support for dynamic table and field mappings
- Data transformation capabilities during mapping
- Multiple interfaces: Web API, Console, and Blazor UI
- Validation of mappings before execution
- Tracking of mapping execution history
- Scheduled mappings for automated synchronization
The solution follows Clean Architecture principles with these layers:
- Domain: Core business models and entities
- Application: Business logic and interfaces
- Infrastructure: Implementation of data access and external services
- API: RESTful Web API for managing and executing mappings
- ConsoleApp: Command-line interface for executing mappings
- UI: Blazor-based web interface for managing mappings and monitoring executions
- .NET 9.0 or higher
- SQL Server (for application database and source data)
- PostgreSQL (for Odoo database)
- Clone the repository
- Update connection strings in
appsettings.jsonfiles for each project - Run the database migrations:
dotnet ef database update --project OdooMapping.Infrastructure --startup-project OdooMapping.Api - Build the solution:
dotnet build
dotnet run --project OdooMapping.ConsoleApp <mapping-guid>
Example:
dotnet run --project OdooMapping.ConsoleApp 00000000-0000-0000-0000-000000000000
The API provides endpoints for managing mappings:
GET /api/mappings- List all mappingsGET /api/mappings/{guid}- Get a specific mappingPOST /api/mappings- Create a new mappingPUT /api/mappings/{guid}- Update a mappingDELETE /api/mappings/{guid}- Delete a mappingPOST /api/mappings/{guid}/execute- Execute a mappingPOST /api/mappings/{guid}/validate- Validate a mapping
Run the Blazor UI project:
dotnet run --project OdooMapping.UI
The UI provides a user-friendly interface for:
- Creating and managing mapping templates
- Configuring and executing mappings
- Setting up scheduled mappings
- Validating data mappings
- Browsing Odoo models and fields
If you encounter any issues with the UI components, ensure that the API project is running, as the UI depends on the API for backend services.
This project is licensed under the MIT License