# Clone the repo
git clone git@github.com:baradm100/web-development-course.git
cd web-development-course
# Install the ef tool
dotnet tool install --global dotnet-ef
# Install packages
dotnet restoredotnet ef database updatedotnet ef migrations add InitialCreatedotnet watch runWe set under appsettings.Development.json a connection string to our local DBs, in order to run on the remote DB we just need to delete the ConnectionStrings segment
Server=(localdb)\\mssqllocaldb;Database=aspLearningDB;Trusted_Connection=True;MultipleActiveResultSets=true
Server=localhost;Database=aspLearningDB;User ID=sa;Password=yourStrong(!)Password
We're using this tool to create backups and restore the DB: sqribe.
For mac just run:
sqribe backup /data_source:"server=db.cs.colman.ac.il;User ID=csdb13a;Password=********;Database=CsDB13;" /objects:"all" /output_path:"~/Desktop/sqribe-backup"For mac just run:
sqribe restore /script_path:"~/Desktop/sqribe-backup" /data_source:'Server=localhost;Database=aspLearningDB;User ID=sa;Password=yourStrong(!)Password;' /objects:"all"For Windows just run:
sqribe restore /script_path:".\sqribe-backup" /data_source:"Server=(localdb)\\mssqllocaldb;Database=aspLearningDB"