Skip to content

jealvarez/dotnet-example-api

Repository files navigation

ASP.NET Core API

Example of how to build an API based on ASP.NET Core

Prerequisites

Database Migrations

To execute SQL Scripts, it was used Flyway

Properties

The properties and its default values are the following:

flyway.driver=com.mysql.jdbc.Driver
flyway.url=jdbc:mysql://127.0.0.1:3306
flyway.user=root
flyway.password=r00t
flyway.schemas=example
flyway.locations=filesystem:../Sql
flyway.encoding=UTF-8
flyway.baselineOnMigrate=true

Note. The above properties can be overwritten. To overwrite just go to Migrations/Configuration/flyway.conf and change the properties with the values that you want.

Migrating

$ cd Migrations/Commands/
$ sh migrate.sh

Application Configuration

In the file appsettings.json set your own database connection configuration under the tag DatabaseConfiguration

Execution

On the main directory where is located the project.json follow the nexts steps:

  1. To build
$ dotnet build
  1. To run
$ dotnet run
  1. Finally, test it here!!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published