TODO is a simple web application that introduces you to the power, performance, and simplicity of MariaDB. The TODO app contains a React.js front-end and .NET back-end, which utilizes the open source, third-party MySqlConnector database drive and Entity Framework object-relational mapping toolkit.
TODO is a web application that introduces you to the power, performance, and simplicity of MariaDB.
This application is made of two parts:
This README will walk you through the steps for getting the TODO
web application up and running using MariaDB.
This sample application requires the following to be installed/enabled on your machine:
MariaDB is a community-developed, commercially supported relational database management system, and the database you’ll be using for this application.
If you don’t have a MariaDB database up and running you can find more information on how to download, install and start using a MariaDB database in the MariaDB Quickstart Guide.
First, use git (through CLI or a client) to retrieve the code using git clone
:
$ git clone https://github.com/mariadb-developers/todo-app-dotnet-entityframework.git
Next, because this repo uses a git submodule, you will need to pull the client application using:
$ git submodule update --init --recursive
Connect to your MariaDB database (from Step #2) and execute the following SQL scripts using the following options:
a.) Use the MariaDB command-line client to execute the SQL contained within schema.sql.
Example command:
$ mariadb --host HOST_ADDRESS --port PORT_NO --user USER --password PASSWORD < schema.sql
OR
b.) Copy, paste and execute the raw SQL commands contained in schema.sql using a client of your choice.
CREATE DATABASE todo;
CREATE TABLE todo.tasks (
id INT(11) unsigned NOT NULL AUTO_INCREMENT,
description VARCHAR(500) NOT NULL,
completed BOOLEAN NOT NULL DEFAULT 0,
PRIMARY KEY (id)
);
This application is made of two parts:
The following steps, a
through c
, will walk you through the process of configuring, building and running the api
and client
applications.
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": "*"
}
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.
Once the API project is running you can now communicate with the exposed endpoints directly (via HTTP requests) or with the application UI, which is contained with the client
folder of this repo.
To start the client
application follow the instructions here.
Please feel free to submit PR’s, issues or requests to this project project directly.
If you have any other questions, comments, or looking for more information on MariaDB please check out:
Or reach out to us diretly via: