GithubHelp home page GithubHelp logo

sararasoulian / dotnet-webapi-sample Goto Github PK

View Code? Open in Web Editor NEW
24.0 2.0 0.0 77 KB

๐Ÿ› ๏ธ A Sample Web API Project

License: MIT License

C# 97.49% Dockerfile 2.51%
asp-net-core clean-architecture entity-framework-core repository-pattern restful-api tdd unitofwork-pattern code-first-approach postgresql docker

dotnet-webapi-sample's Introduction

ASP.NETCore Web API Sample

This repository is a sample ASP.NET Core Web API (.NET 7) project.

Features & Technologies

  • ASP.NET Core Web API
  • Entity Framework Core
  • Clean Architecture
  • Unit Of Work Pattern
  • Repository Service Pattern
  • TDD
  • PostgreSQL
  • Docker

Get started

1. Clone the repository

git clone https://github.com/SaraRasoulian/DotNet-WebAPI-Sample.git

2. Start with docker compose

Make sure docker is installed on your machine.

Run the following command in project directory:

docker-compose up -d

Docker compose in this project includes 3 services: web API application, postgres and pgadmin4.

  • Web API application will be running and listening at http://localhost:5000

  • Postgres database will be listening at http://localhost:5433

  • PgAdmin4 web interface will be listening at http://localhost:8080

To apply your modified code, you can add build option:

  docker-compose up -d --build

To stop and remove all containers, use the following command:

  docker-compose down

3. Run the migrations

Open Sample.sln file in visual studio, then in package manager console tab, run:

update-database

This command will generate the database schema in postgres container.

Contributions

Contributions are welcomed! If you identify areas for improvement, please feel free to raise an issue or submit a pull request.

dotnet-webapi-sample's People

Contributors

sararasoulian avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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