About The Project

Description

A sample RESTful Web Service of Clean Architecture and rich domain model.


Architecture

  • Domain

Where it all started. It is the center of architecture. Includes only domain logic. It has no dependencies to any project or package.

  • Application

It depends on Domain. Includes application logic, contracts, mappings, validations.

  • Persistence

It depends on application core (Application and Domain). It doesn't include any logic, only includes data access implementations related to application core.

  • Infrastructure

It includes some of technologies related to application core.

  • Api

It is the startup project. Handles requests from client. It includes Web and Http related implementations, RESTful concepts, endpoints, dependency injections.


Technologies

  • .Net 5.0
  • AspNetCore WebAPI
  • EntityFrameworkCore
  • FluentValidation
  • MediatR
  • AutoMapper
  • MSSQLServer
  • Docker



Installation

Clone from GitHub

git clone https://github.com/tolgacakir/ride-share.git



Build And Deploy

How to run on local


  • Add Migration
dotnet ef migrations add InitialMigration --project src/RideShare.Persistence

  • Restore
dotnet restore src/RideShare.Api

Make sure the SQL Server name in the connection string is correct.

  • Run
dotnet watch run --project src/RideShare.Api



How to publish on Docker


Make sure the SQL Server name in the connection string is correct.

Make sure the generated rideshare-api image is generated from your code has the correct connection string.

  • Add Migration
dotnet ef migrations add InitialMigration --project src/RideShare.Persistence

  • Create Docker compose:
docker-compose up

  • Browse Swagger:
http://localhost:5000/swagger/index.html