- - Create app
- - Look into MVC pattern
- - Connect to Postgres Database
- - Design models
- - CRUD Questionnaire model
- - CRUD Template model
- - Setup NUnit tests
- - CRUD TemplateQuestionLink + Question
- - CRUD Submission
- - CRUD Answer
- - Create User model + add to Questionnaire created_by field.
- - Locking templates so cannot have answers until it is 'locked'. Cannot modify after locked.
- - - Cannot make submissions if not locked if only one template
- - - Submissions are for previous locked template, if latest if unlocked
- - - cannot create a new template if latest is unlocked
- - duplicating templates
-
- - Setup Electron project
-
- - Users can log in
-
- - Users can create their own Questionnaires
-
- - Users can create their own Templates
-
- - Users can add questions to their templates
-
- - Users can duplicate their templates
-
- - Users can create submissions
-
- - Users can add answers to their submissions
-
- - Export electron project
- - Setup CI on GitHub Actions
- - Put Dotnet Project onto Lambda
- - Connect to Postgres Database online
- - Connect local running Electron Project to Dotnet Lambda
- - Setup CD on GitHub Actions
dotnet ef migrations add MigrationNameUpdate Entity Framework Core migrations.
dotnet ef database updateIf you want to just create a test migration without applying it, you can use the --output-dir command.
dotnet ef migrations add TempMigrationPreview --output-dir Migrations/Temp
# To remove unapplied migrations
dotnet ef migrations removeYou have to make sure that your Snapshot also reverted.
Only do this if you are not in production.
dotnet ef database drop
dotnet ef database updateOtherwise, you can unapply the latest migration with:
dotnet ef database update <PreviousMigrationName>
# then remove your latest migration
dotnet ef database remove <PreviousMigrationName>https://learn.microsoft.com/en-us/training/modules/build-web-api-aspnet-core/ https://learn.microsoft.com/en-us/aspnet/core/data/ef-mvc/intro?view=aspnetcore-9.0 https://learn.microsoft.com/en-us/aspnet/core/tutorials/first-web-api?view=aspnetcore-9.0&tabs=visual-studio-code
Before you start:
dotnet clean # only if you messed up your environment
dotnet restore
dotnet buildTo run LifeTracker from root.
dotnet run --project LifeTrackerYou can also cd into the LifeTracker project folder and run:
dotnet runTo run the tests, go to LifeTrackerTest.
dotnet testFor running a particular test suit:
dotnet test --filter "AnswerTests"For running just one test:
dotnet test --filter "FullyQualifiedName=LifeTracker.Tests.Services.AnswerTests.CreateAsync_ShouldAddAnswerToDb"