Home

Awesome

Example C# .NET Core 3 (and 2.2) Runtime (CoreRT) with connect MySQL via not using any ORM

Preparing

  1. Import Database from database.sql
  2. Add Environment Variable named "DB_CONNECTION" as value "Server=localhost;Port=3306;Uid=root;Pwd=1234;Database=lab;CharSet=utf8;ConvertZeroDateTime=True;"

ps. If you not want to use Environment Variable, can add config to "configDB" on line 20

Test

Test Normal App

$ bin/Release/netcoreapp3.0/osx-x64/corert-db

Test Native App

$ bin/Release/netcoreapp3.0/osx-x64/native/corert-db

ps. Should to change netcoreapp3.0 and osx-x64 depend on your config

Command for compile

$ sh run.sh [Runtime]

Example for MacOS

$ sh run.sh osx-64

Example for Linux

$ sh run.sh linux-64

System Require for Linux