Giter Club home page Giter Club logo

airtel-mtn-cbs's Introduction

Airtel-MTN-CBS

CONFIGUTING THE DATABASE (MYSQL DATABASE )

INSTALL MYSQL :

sudo apt-get install mysql-server

Secure MySQL Installation:

sudo mysql_secure_installation

Log in to MySQL

sudo mysql -u root

Set the root password and configure MySQL to use password authentication for the root user:

ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '*********';

Flush the privileges to ensure that the changes take effect:

FLUSH PRIVILEGES;

Exit MySQL:

EXIT;

log in to MySQL using the new root password:

mysql -u root -p

Check Users and Authentication Methods:

SELECT user, host, plugin FROM mysql.user WHERE user = 'root';

Create a Database

CREATE DATABASE your_database_name;

Create a New User FOR THE DATABASE:

CREATE USER 'Winnie'@'localhost' IDENTIFIED BY '********'; GRANT ALL PRIVILEGES ON BankingSystem.* TO 'Winnie'@'localhost'; FLUSH PRIVILEGES;

RELATIONSHIPS

User Model:

One user can have multiple transactions, defined by the ICollection Transactions property. ONE TO MANY RELATIONSHIP

Transaction Model:

Each transaction belongs to one user, defined by the User User property. (ONE TO ONE ) Each transaction has one status, defined by the TransactionStatus Status property.(ONE TO ONE) Each transaction can have multiple additional infos, defined by the ICollection AdditionalInfos property.(ONE TO MANY RELATIONSHIP)

TransactionStatus Model:

Each status can be associated with multiple transactions, defined by the ICollection Transactions property.(ONE TO MANY)

AdditionalInfo Model:

Each additional info is related to one transaction, defined by the Transaction Transaction property.(ONE TO ONE)

RUNNING MIGRATIONS

Install Entity Framework Core Tools:

dotnet tool install --global dotnet-ef

Verify Installation:

dotnet ef --version

Ensure Application Builds Successfully: dotnet run

Create Migrations:

dotnet ef migrations add InitialCreate

Apply Migrations to Database:

dotnet ef database update

oy have to identify the primary key attribute using

[key]

Install dotnet-ef as a Local Tool(this is done before the migrations commands incase of any errors)

dotnet new tool-manifest dotnet tool install dotnet-ef --local dotnet tool run dotnet-ef --version dotnet ef --version

after this run the migrations command

seeding

adding data to the database that we will use to test

Add a New Migration: Create a new migration to incorporate the seeding changes.

dotnet ef migrations add SeedData

Apply the Migration: Apply the new migration to update the database with the seeded data.

dotnet ef database update

Run Your Application:

dotnet run

AIRTEL AND MTN INTERGRATION:

authentication(obtaining the secret key and client id)

testing the code using postman

airtel-mtn-cbs's People

Contributors

winniegithubrit 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.