ASP.NET Core and Vue.JS (Vue) using MySql Databae - with Webpack (with HMR), Web API, Vuex state manangement, Entity Framework and Repository Pattern.
- ASP.NET Core 2.1
- Web API
- Entity Framework
- Repository Pattern
- VueJS 2
- Vuex (State Store)
- Json Web Token (JWT)
- Webpack
- HMR (Hot Module Replacement/Reloading)
- Bootstrap 3
- MySql Database
- .Net Core 2.1
- NodeJS >= 10.x
- VSCode (ideally), or VS2019
- MySql 5.7
- Clone this repository :
$ git clone https://github.com/harendra1993/vue-dotnetcore-mysql.git $ cd vue-dotnetcore-mysql/$ npm i --prefix src/VueDotNetCoreMySql.App/ && dotnet restore- (If using VSCode)
$ code . - (If using Visual Studio) Open the
*.slnfile with "Open project" from Visual Studio IDE
Now you can open the project via Visual Studio or VSCode, press F5 to run the application!
Note:
- This will automatically run
dotnet restore - (Official documentation)
You have two choices when it come at how your preffer to run it. You can either use the command line or the build-in run command.
Run the application using dotnet run or npm run dev
- note
dotnet runshould be run inDevelopmentenvironment for hot reloading. This setting can be set either within the command line or via thelaunchSettings.jsonavailable in thePropertiesfolder.
Run the application in VSCode or Visual Studio 2019 by hitting F5.
When running the app using debug menu or F5 VS open auto the app in the browser;
- Nevigate to Data Project Directory
cd src/VueDotNetCoreMySql.Data - Run migration scripts
dotnet ef migrations add InitialCreate --startup-project ../VueDotNetCoreMySql.App/ - Update the Database
dotnet ef database update --startup-project ../VueDotNetCoreMySql.App/ - (Checkout more migration commands)