Giter Site home page Giter Site logo

atm's Introduction

Installing

The project uses .net 7.

Follow these steps to get your development environment set up:

  1. Clone the repository
  2. Add the source for nuget packages:
dotnet nuget add source --name nuget.org https://api.nuget.org/v3/index.json
  1. At the root directory, restore required packages by running:
dotnet restore
  1. Next, build the solution by running:
dotnet build
  1. Next, create atm database and configure the connection string in appsettings.json.
  2. Next, update database.
dotnet ef database update
  1. Next, launch the back end by running:
dotnet run
  1. Launch http://localhost:5142/swagger/index.html in your browser to view the Web UI.

Usage

There are 3 groups of endpoints: Accounts, Clients and Transactions. Accounts and Clients have CRUD endpoints for making the basic operations. The get single account endpoint will retrieve a field called balance witht the balance of the account.

Transactions has three endpoints for the main operations: Deposit, Withdraw and Transfer. These 3 operations are store in one table with different transaction types. Deposit creates 1 row with positive amount, Withdraw also creates 1 row with negative amount and Transfer creates 2 rows one with negative value in the origin account and the other with positive amount in the destination account.

The update transaction endpoint receive always positive values for amount, if transaction is deposit the amount will be updated as positive, if it is withdraw, amount will be updated as negative, if transaction is transfer, it will update the 2 rows related one with positive amount and the other with negative amount.

The delete transaction endpoint cannot remove the negative amount row related to transfer alone. For removing it, endpoint will accept the id of the main transfer row for removing both rows.

atm's People

Contributors

mhxahji avatar

Watchers

 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.