Skip to content

JonParvez/TablesComparer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MatchTables

Necessary instructions are given below for setup, build and execution of this applicaiton...

Purpose of This Project

  • Compare two identical tables of it's schema, added/delete/changed records and any other changes made.

Cloning

To clone the repowitory to your local machine run this command. (You must have git installed in your local machine)

git clone https://github.com/JonParvez/TablesComparer.git

Basic Machine Requirements

Application Setup Requirements

  • Add your local sql server connection string in the appsettings.json
{
  "ConnectionStrings": {
    "DefaultConnection": "Data Source=localhost;Initial Catalog=MatchTableDB;Integrated Security=SSPI;"
  }
}
  • Execute this mandatory database script given in DatabaseScript folder in the repository (DatabaseScript\DatabaseSchemaAndSeedDataScript.sql)
    • It will create sample tables schema and insert the seed data

After Running the Application

There are three ways to provide the required input in the application, You can follow one from these instructed ways:

1. Run the application and there will be reader in the console for the inputs

Example:

-TableName1 : SourceTable1
-TableName2 : SourceTable2
-PrimaryKey : SocialSecurityNumber

2. Build the application and go to the application build path (eg: {YourFolderDirectory}\TablesComparer\MatchTables\bin\Debug\net6.0 and after the console pop up, then put this command

MatchTables.exe -TableName1 SourceTable1 -TableName2 SourceTable2 -Primarykey SocialSecurityNumber

3. Run with predefined command line arguments To setup the arguments in visual studio:

  • Right-Click on Project. Go to Properties -> Debug -> General -> Command line arguments
  • Put this command in the argument box:

-TableName1 SourceTable1 -TableName2 SourceTable2 -Primarykey SocialSecurityNumber

image

Sample Output

image

Run Unit Test

To run unit test cases, go to the Test Explorer and run all the tests at once... Sample unit test output:

image

Used Frameworks, Design Patterns and Principles

  • ASP.NET Core 6
  • Repository Pattern
  • Dependency Injection
  • Generic methods
  • Extension methods
  • Unit Tests with mocking (xUnit, NSubstitute)

Further Contacts:

Md Abdul Kuddus Parvez

Email : parvez.mak4132@gmail.com

About

tables-comparer

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors