Code Monkey home page Code Monkey logo

workspancloner's Introduction

.NET Core and Workspan Cloner

This is a console application written in .NET Core 2.1 that recieves a .json file containing entities and links between them. The app also recieves the ID of the entity that needs to be cloned. Cloning process also clones all the entities that are related to that node whether they are direct descdenents or indirect descdendents. The links are updated with new nodes and all the nodes that were pointing to original node also point to cloned node. All nodes are connected with other nodes in Parents and Children relation.

Step 1: Install .NET Core

First step is to install .NET core, this is pretty easy to do, just follow the instructions. You'll know that the install worked if you can type this in your terminal and see a result:

dotnet --version

Step 2: Clone the repository

git clone https://github.com/brankosimic/WorkspanCloner.git
cd WorkspanCloner

Step 3: Run the example

Once you have cloned the repository, run the following command to "restore" the .NET dependencies listed in project.json file in both projects:

dotnet restore

Once that is complete, run the tests which will also build the project:

dotnet test

To use the application with your .json file, run:

dotnet run --project WorkspanCloner /Users/branko/Desktop/2levelexample.json 5

Example of .json file:

{
  "entities": [
    {
      "entity_id": 3,
      "name": "EntityA"
    },
    {
      "entity_id": 5,
      "name": "EntityB"
    },
    {
      "entity_id": 7,
      "name": "EntityC",
      "description": "More details about entity C"
    },
    {
      "entity_id": 11,
      "name": "EntityD"
    }
  ],
  "links": [
    {
      "from": 3,
      "to": 5
    },
    {
      "from": 3,
      "to": 7
    },
    {
      "from": 5,
      "to": 7
    },
    {
      "from": 7,
      "to": 11
    }
  ]
}

workspancloner's People

Contributors

brankosimic avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.