Skip to content

Latest commit

 

History

History

dapper

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

TODO - .NET/C# (with Dapper + MySQLConnector)

This .NET solution uses the MySQLConnector in combination with the Dapper Object Mapping library to connect to and communicate to a MariaDB database instance.

  1. Requirements
  2. Getting started with the app
    1. Configure the code
    2. Build and run the app

Requirements

This sample was created using the following techologies and they must be installed before proceeding.

Getting started with the app

First, open Todo.sln in Visual Studio.

Configure the code

Configure the MariaDB connection with your connection details in appsettings.json file.

Example implementation:

{
  "Logging": {
    "LogLevel": {
      "Default": "Information",
      "Microsoft": "Warning",
      "Microsoft.Hosting.Lifetime": "Information"
    }
  },
  "ConnectionStrings": {
    "TodoDatabase": "host=localhost;port=3306;user id=app_user;password=Password123!;database=todo;"
  },
  "AllowedHosts": "*"
}

Run the app

Once you've pulled down the code and have verified built the project you're ready to run the application!

  1. Build and run the application using Visual Studio. The solution will be built and the Web API project will begin listening on http://localhost:8080.

  2. Within the terminal, navigate to the client folder and execute the following CLI command to start the React.js application.

$ npm install
$ npm start
  1. Open a browser window and navigate to http://localhost:3000 (which will load the TODO application web UI).