This a test demo project.
I use these steps to setup this project.
-
In Visual Studio 2022 create a MVC project
-
In Visual Studio Git create a repo in github
-
In Package Manager Console Install-Package Microsoft.EntityFrameworkCore.Sqlite Install-Package Microsoft.EntityFrameworkCore.Tools
-
In Model folder: create DbContext and Models (Using SqlLite, so set the directory in Mydocument)
-
In Package Manager Console add-migration update-database (setup the database and tables)
-
add Api controller
-
In program.cs config DbContext
-
using postman test api add some data.
-
add index page
-
add report page
To use the repo
need in visual studio Package Manager Console run updata-database to setup the local sqllite database and tables
In the home page is used to generate the mock data to backend
- click Send button will send one record data to backend.
- Before click send button, you can change the data in the page.
- Click Send data every 5 seconds button will send data every 5 seconds util the value of "Repeat send data times" count to 0.
- You can chang send how many data.
- Click Send button will send the data according the value of pages.
- Click Send data every 5 seconds button will send the time value and a random number rang 0 to 10.
- click Report, will show the report