Running
This example uses .NET Core 1.0.1 and MySQL 5.6. If you miss some installations, please, visit: MySQL download page and installation instructions to setup MySQL.
ASP.NET Core page to install ASP.NET Core.
To start this example run commands listed below.
Clone the repository from github.com to your working directory:
$ git clone git@github.com:anychart-integrations/asp-net-core-mvc-mysql-dashboard.git
Open cmd console in asp-net-core-mvc-mysql-dashboard folder and set up MySQL database, use -u -p flags to provide username and password:
$ "[YOUR_PATH_TO_MYSQL]\bin\mysql.exe" -u[USER_NAME] -p < database_backup.sql
e.g:
$ "C:\Program Files\MySQL\MySQL Server 5.6\bin\mysql.exe" -uroot -p < database_backup.sql
Open project in Visual Studio or Visual Studio Code.
Run application using Run button.
Or you can use next commands, be sure you're in asp-net-core-mvc-mysql-dashboard folder:
$ dotnet restore
$ dotnet run
Workspace
Your workspace should look like:
asp-net-core-mvc-mysql-dashboard/
Controllers/
ChartController.cs # main controller
Models/
Sale.cs # Sale class
SalesDBContext.cs # DB data provider
Views/
Chart/
Index.cshtml # html template with main dashboard JS code
wwwroot/
css/
style.css # css style
appsettings.Development.json
appsettings.json
asp-net-core-mvc-mysql-dashboard.csproj # project config
bower.json
bundleconfig.json
database_backup.sql # sql code and data
LISENCE
Program.cs
README.md
Startup.cs
Technologies
- Language - C#
- Web framework - ASP.NET Core
- Database Mapping - Entity Framework
- HTML Tepmlate - Razor
- Database - MySQL
Further Learning
License
AnyChart ASP.NET Core/C#/MySQL integration sample includes two parts:
- Code of the integration sample that allows to use Javascript library (in this case, AnyChart) with ASP.NET Core framework, C# language and MySQL database. You can use, edit, modify it, use it with other Javascript libraries without any restrictions. It is released under Apache 2.0 License.
- AnyChart JavaScript library. It is released under Commercial license. You can test this plugin with the trial version of AnyChart. Our trial version is not limited by time and doesn't contain any feature limitations. Check details here.
If you have any questions regarding licensing - please contact us. sales@anychart.com