Data Import and Export
Files Referenced in this Document
IMyEntityNameAppService.csMyEntityNameAppService.csMyEntityNameExcelDto.cs
Table of Contents
Introduction
The Data Import and Export module provides a standardized way to move large amounts of data in and out of the system. Integrated within the Application Service layer, it ensures that data handling respects the same business rules and validation logic as standard API calls.
Overview
This feature is designed to support:
- Bulk Creation: Importing data from external sources via Excel.
- Reporting: Exporting current system data for offline analysis.
- Migration: Moving data between environments.
Architecture
The functionality is built upon the IDataImportAppService<T> interface, which enforces a standard contract for import/export operations.
- DTOs:
MyEntityNameExcelDtodefines the structure of the Excel row, often using attributes to map column names. - Service:
MyEntityNameAppServiceimplements the logic, coordinating between the Repository (database) and the Excel Manager (file parsing). - Excel Manager: A utility component responsible for reading/writing Excel file streams.
Supported Formats
Currently, the system primarily supports:
- Import:
.xlsx(Excel 2007+) - Export:
.xlsx(Excel 2007+)
This covers the most common business use cases.