Skip to content

furkandeveloper/RideShare

Repository files navigation

Welcome to documentation

Ride Share Api Documentation

This project is sample for Event.

Table of Contents


Summary

Directories Description
Contexts Database contexts are here. Currently MongoDB Context is here.
Controllers Default folder of MVC for Controllers. Controller Versions are seperated by folders like V1, V2 etc.
Extensions Includes Classes with Extension Methods.
Exceptions Includes Custom Exceptions to allow throwing exceptions handled situations in anywhere in app.
Helpers Includes helper class to make things easier.
Middleware Includes stuffs which handles and works for all requests. Like Auth., Exceptions etc.
Models Default folder of MVC for Models. Includes database models and service models.
Repositories Includes queries of database. It's an access layer to database.
Services Includes connections of services. It's an access layer to other services. Like Payment, Tenant etc.

For Server;

[Authorize] // < --- This endpoint requires authentication
public async Task<IActionResul> MyMethod()
{
   //do something...
}

or

[Authorize] // < --- Endpoints in this controller require authentication
public class MyController : BaseController
{
    [AllowAnonymous] // < --- But this endpoint doesn't require any authentication
    public async Task<IActionResul> MyMethod()
    {
       //do something...
    }
}

Api Responses

Api responses all request with same sheme. You can see sheme with following block:

    Message                 : Message about response.
    IsUserFriendlyMessage   : The message comes from resource or not
    Key                     : key of Warning / Error.
    Data                    : Result of request
    Meta                    : Metadatat about Data. (Ex.: PaginationData for lists etc.)
    Errors                  : Handled errors during request.
        

Services

Here includes communication layers to other Services.

Repositories

Here includes access layers to database. There are 3 folders in here.

  1. Base
    • Includes Generic BaseRepository and IBaseRepository which provides main CRUD process independent of model. Just inherit from this and CRUD process are ready to use.
  2. Abstraction
    • Here is for Interfaces of repositories. Interfaces are extracted to here from repositories.
  3. Concrete
    • Includes concrete Repository classes.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages