A generic table matching console application using .net core and entity framework core and entity framework plus core. You can run the matching upon on any two different entities where the booth primary key is the same. For the best output ensure both entities scheme are same.
- Clone the repository
- Open solution is visual studio
- Set your database server name in appsettings.json "Default": "server=YourDatabaseServerName;database=AuditorDb;Trusted_Connection=True;"
- Build and run the program (Ensure Client project is marked as startup project)
-
Download an executable exe version from here
-
Extract the zip.
-
Update the appsetting.json with your database server name "Default": "server=YourDatabaseServerName;database=AuditorDb;Trusted_Connection=True;"
-
Run Client.exe and start playing.
-
Sample inputs :
- Empployee Source | Employee Target | Social Security Number
- Student Source | Student Target | Student Id
- Starting point : Program.cs
- Program automatically creates the database and inserts some seed data. If any already exists,it will update with the latest value. See DatabaseService.cs for detail reference.
- You can provide the source, target and primary key as user define inputs. Find the source code in DynamicInputHandler.cs
- MatchTable.cs class does the matching and returns a matching response.
- MatchTable.FindMatch takes the 3 parameters (source entity type, target entity type, primary key)
- MatchTable.SetBatchSize() take one integer parameter to control the batch limit from client
- Microsoft.NetCore App
- Code First Approach
- Entity Framework Core 3.1
- Entity Framework Plus Core
As I have used code first approach there are some limitations which I should notice.
- For new tables is database, need to create new models and add the models reference on AuditorDbContext and also need to create a new migration using Add-Migration command
- For working with any database just changing the connection string, the existing application needs some breaking changes. Hopefully I will have time to update it in a later version. (Maybe I can achieve this with a dynamic context creator or changing to database first approach or in a raw sql query version). Any other good advice is appriciateable
- To test the existing database, there needs to use entity framework core command Scaffold-DbContext for DataSource project and replace the AuditorDbContext references with the Scaffold generated DbContext. In my next release I will make the changes to configured the context in a single place at the starting point of the application
View sample outputs from here