Skip to content

Dog transport coordination web application for dog rescues

License

Notifications You must be signed in to change notification settings

Joklom/DogTransport

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 

Repository files navigation

DogTransport

How to run the application locally

In production the application makes use of environmental variables to obscure the AzureSQL connection string. In development on your local machine you will be using a disposible SQLite database so you will probably need to do a database migration before the application will run locally.

When you clone the repository, there should not be a Migrations/ folder or a database (app.db) but you may end up with these files from previous work, or accidental addition to the repository. If you have these files locally you may not need to do a migration, but the database will probably get cluttered fast and need to be deleted.

You can pretty much just delete Migrations/ and app.db whenever you want and it will not break anything. There are also limitations to SQLite that will force you to delete them because you can't update the database to do what you need to do. You will lose all of the data in the database so this does not work in production.

To perform a database migration go to the project folder and run the following Bash command:

dotnet ef migrations add CreateDatabase --context DogTransport.Data.ApplicationDBContext
dotnet ef database update --context DogTransport.Data.ApplicationDBContext

Useful Bash commands

ASP .Net Core

Build project and its dependencies:

dotnet build

Run the application:

dotnet run

Entity Framework

Delete the last ef migration:

dotnet ef migrations remove --context DogTransport.Models.ModelsContext

Create a new ef migration:

dotnet ef migrations add MigrationName --context DogTransport.Data.ApplicationDBContext
// Be sure to change the migration name as necessary

Update the database with new migration:

dotnet ef database update --context DogTransport.Data.ApplicationDBContext

ASP .NET Code Generator

List files available to be generated:

dotnet aspnet-codegenerator identity --listFiles

Generate code:

dotnet aspnet-codegenerator identity --files "Files.To.Be.Generated"
// Be sure to change the files to be generated string as necessary

Helpful YouTube videos

GIT Workflow - Georgia Tech - Software Development Process

GitHub Flow Tutorial: Basic workflow for git

About

Dog transport coordination web application for dog rescues

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published