Web API for AC Gallery, built on ASP.NET Core. This web api can be deploy to Cloud platform like Microsoft Azure.
To deploy this Web API to your own server, please follow the steps below.
You can clone this repository or download it.
You need setup your own database (SQL Server based), and run scripts under folder 'sqls': DBSchema.sql
As the project was keep updated, the database schema changes are logged with order.
Also, the scripts have taken the upgrading into account. For instance, when adding a column to a table, the original table defintion will be updated directly, there will be a ALTER table script to handle existing tables.
The appsettings.json has been removed because it defines the connection strings to the database. This file is manadatory to make the API works.
An example file look like following:
{
"ConnectionStrings": {
"DefaultConnection": "Data Source=XXX;Initial Catalog=XXX;Persist Security Info=True;User ID=XXX;Password=XXX;",
"DebugConnection": "Server=XXX;Database=XXX;Integrated Security=SSPI;MultipleActiveResultSets=true"
},
"Logging": {
"IncludeScopes": false,
"LogLevel": {
"Default": "Debug",
"System": "Information",
"Microsoft": "Information"
}
}
}
By default, this Web API can deploy to IIS or IIS Express, or any other HTTP server which can host ASP.NET Core.
Though the whole project was compiled with Visual Studio 2017 Community Version, the project can be processed by command lines with ASP.NET Core supported.
An unit test project also included in this repo. You can run the unit test to ensure the codes run successfully.
Alva Chien (Hongjun Qian) | 钱红俊
A programmer, a photographer and a father.
Contact me:
- Via mail: alvachien@163.com. Or,
- Check my flickr.
MIT