A C#/ASP.NET Core web application for blog demo purposes for deploying on Linux.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
Controllers
Entity
Migrations
Models
Properties
Repositories
Services
ViewModels
Views
wwwroot
.gitignore
Program.cs
README.md
Startup.cs
appsettings.json
lk2-demo.csproj
lk2-demo.sln

README.md

LK2 URL Shortner Service

This repository serves as a simple, working example for hosting ASP.NET Core applications on Ubuntu Linux.

This code is recommended for demonstration purposes only.

You can see and follow the blog post here: http://blog.bobbyallen.me/2017/05/01/deploying-and-hosting-asp-net-core-applications-on-ubuntu-linux/

Supported Database Engines

This demo app supports both SQLite and MSSQL. These can be set and configured in the appsettings.json file. See the below examples of connection strings for both platforms.

SQLite is enabled by default and the Startup.cs file (for simplicity) will automatically run your migrations at start-up:-

SQLite

{
  "DbDriver":  "sqlite",
  "ConnectionStrings": {
    "DefaultConnection": "Data Source=database.sqlite;"
  }
}

Users can also switch to use MSSQL if they wish...

MSSQL

{
  "DbDriver":  "mssql",
  "ConnectionStrings": {
    "DefaultConnection": "Data Source=vsvr-sql027;Initial Catalog=lk2;Integrated Security=False;User Id=sa;Password=<YourSaPassword>;"
  }
}