andriyshevchenko / TransIT.API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TransITAPI

Build status

This project was built with .NetCore 2.2 using AspNetCore, EntityFrameworkCore, AutoMapper. This repository contains server-side application, client-side is stored here.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

What things you need to install to run this project and how to install them

Installing

  1. Install Visual Studio IDE with ASP.NET, be sure to check out ASP.NET and web development Screenshot;
  2. Install .NetCore 2.2 SDK;

Running API

  1. Clone repository;
  2. Checkout dev branch;
  3. Open Package Manager Console(ALT+T+N+O);
  4. Choose TransIT.API as default project Screenshot;
  5. Enter command "add-migration TransITDB";
  6. Choose TransIT profile Screenshot;
  7. Start Project (F5);
  8. Do not close created web browser tab with swagger or console application until you want server to stop;

Possible Errors and how to fix them

The current .NET SDK does not support targeting .NET Core 2.2. Either target .NET Core 2.1 or lower, or use a version of the .NET SDK that supports .NET Core 2.2. Install .Net Core 2.2 SDK;
System.AggregateException at app.SeedEssentialAsync You didn't create any migration for db, repeat 3-5 steps of Running API
System.AggregateException at any part of the program Probably, You made changes to entities that need recreation of database. To recreate database delete Migrations folder and database (CTRL+\, CTRL+S Screenshot.) Also this exception can occur if you violate database restrictions, make sure that you understand requirements right and are using UnitOfWork properly.

Running the tests

To Run the test choose Test->Run->All Tests or use CTRL + R, A Hotkey Screenshot.

Development

Development server is accessible via https://localhost:8080 or http://localhost:5000. Intial users that are seeded after database is created can be found in TransIT.API/appsettings.json;

Deployment

Choose TransIT.API project and click right mouse button, then choose publish.

Built With

About


Languages

Language:C# 79.3%Language:TSQL 20.7%