playing with dotnet core 52 - dataStorage19 using dotnet ef migrations to create MariaDb databases
to install dotnet ef for migrations
dotnet tool install --global dotnet-ef
dotnet tool update --global dotnet-ef
in your project folder with the csproj file, you need to install:
dotnet add package Microsoft.EntityFrameworkCore.Design
to check if the dotnet ef tools are installed
To use dotnet ef for migrations if you have more than one DbContext
dotnet ef migrations add InitialCreate --context AppDbContext
dotnet ef database update --context AppDbContext
substitute AppDbContext with whatever the name of your Application DbContext is.
If you want to remove the migrations,
dotnet ef migrations remove --context AppDbContext
What do migrations do?
They initialise C# files used to interact with mariaDb, you will execute or invoke these files when you use dotnet ef database update --context AppDbContext.
------------------ Useful Links ------------------------------------
Credits to Kudvenkat PragimTech
https://www.youtube.com/watch?v=qJmEI2LtXIY&list=PL6n9fhu94yhVkdrusLaQsfERmL_Jh4XmU&index=49
EF Core Tools Installation
https://docs.microsoft.com/en-us/ef/core/cli/dotnet
dotnet core migrations, create database
https://docs.microsoft.com/en-us/ef/core/managing-schemas/migrations/?tabs=dotnet-core-cli
------ Video Sections ------
Chapters:
0:00 Introduction
1:35 installing dotnet ef
4:45 why use migrations?
6:47 starting out with fresh database
9:19 reminder: don't mix create API with migrations!
11:30 shut off dotnet watch before applying migrations
12:38 dotnet ef migrations add
13:10 dotnet ef migrations remove
13:58 dotnet ef migrations add (remember to specify which dbcontext you are using)
14:23 dotnet ef databse update
14:58 checking databases with mariadb
16:47 reminder: specify which dbContext you want to use
17:05 checking autogenerated C# files
17:34 Conclusion
---------------------[Playlists and Relevant Github Repositories]----------------------------------------------
Fluid Mechanics and Git Repos:
https://www.youtube.com/playlist?list=PLhPfNw4V4_YSmdAXc6J0XOSQ1b27qsMGt
https://github.com/theodoreOnzGit/OpenFoam_heatTrf_YouTube
Petroleum Downstream Crash Course Playlist:
https://www.youtube.com/playlist?list=PLhPfNw4V4_YQ13CnhacUqEVk-tZlU4ISE
OpenFOAM for Windows 10 Beginner Playlist and some Git Repos
https://www.youtube.com/playlist?list=PLhPfNw4V4_YRhBU4IqSaToQ8_X543YQsZ
https://github.com/theodoreOnzGit/laminar_BL_OpenFOAM
OpenFOAM Intermediate Playlist and some Git Repos
https://www.youtube.com/playlist?list=PLhPfNw4V4_YSpWX6mSOlwWEOKVa6i_iuE
https://github.com/theodoreOnzGit/thin_pipeflow_snappyHexMesh
OpenFOAM Heat Transfer Playlist and GitHub Repo
https://www.youtube.com/playlist?list=PLhPfNw4V4_YR2Qa3Q9-AzNSF2J9Dc4_qT
https://github.com/theodoreOnzGit/OpenFoam_heatTrf_YouTube
Radiation Heat Transfer Learning Journal and Git Repos:
https://www.youtube.com/watch?v=uUzh9kh-WTo&list=PLhPfNw4V4_YRUUVUydQp-n6U-7uu1kJof
https://github.com/theodoreOnzGit/heatTransferTheory_YouTube
Convection Boundary Layer and git Repos:
https://www.youtube.com/playlist?list=PLhPfNw4V4_YR9pRBpp101Mkuds49vjQ63
https://github.com/theodoreOnzGit/heatTransferTheory_YouTube
Turbulence Modelling Playlist
https://www.youtube.com/watch?v=F_Rxv9uMM3g&list=PLhPfNw4V4_YSnbYkJIBQ1kRN06Mmxe2Be
https://github.com/theodoreOnzGit/turbulenceModelling
LabView Frequency Analysis and Fun (playlist and git repo)
https://www.youtube.com/playlist?list=PLhPfNw4V4_YQYE7XqTisMBkpm7gqNS_nl
https://github.com/theodoreOnzGit/Ted_labview_YouTube
Control Systems and Frequency Response
https://www.youtube.com/watch?v=qHY6y7JmB2U&list=PLhPfNw4V4_YRUuWnrtClovPKxU_gJOXH-
https://github.com/theodoreOnzGit/matlabFrequencyResponse.git
OpenFOAM C++
https://github.com/theodoreOnzGit/C-_YouTube_OpenFoam
https://www.youtube.com/playlist?list=PLhPfNw4V4_YT9OgqS7ZPlot_Ucxzc6pQJ
OpenFOAM Bash
https://github.com/theodoreOnzGit/Bash_OpenFOAM_YouTube
https://www.youtube.com/playlist?list=PLhPfNw4V4_YT5zjBhfj5Hj4r4D5eXilcU
Basic Samba
https://www.youtube.com/playlist?list=PLhPfNw4V4_YQuWJLufBUpNplitReZX0fB
https://github.com/theodoreOnzGit/sambaVideos
Manjaro Tips and Tricks
https://www.youtube.com/playlist?list=PLhPfNw4V4_YQuyXBfJxAvzHJTl0UiWx3h
lammps and Discrete Element Modelling (DEM)
https://www.youtube.com/playlist?list=PLhPfNw4V4_YTdRlnLiu2OUXeTf5ZNVQ9E
playing with dotnet core
https://www.youtube.com/playlist?list=PLhPfNw4V4_YQSTR8sqz0aRVzWlQBq3QUw
dotnet core github repo
https://github.com/theodoreOnzGit/dotnetCoreYoutube