Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create db relation between Cost and Category #41

Open
kaajoj opened this issue May 2, 2023 · 0 comments
Open

Create db relation between Cost and Category #41

kaajoj opened this issue May 2, 2023 · 0 comments
Assignees

Comments

@kaajoj
Copy link
Owner

kaajoj commented May 2, 2023

Uncomment in Cost.cs:
// public Category Category { get; set; }

https://sqlite.org/foreignkeys.html
maybe use raw sql to add fk

https://dev.to/icebeam7/foreign-keys-in-local-databases-with-sqlite-net-and-net-maui-22a1

other solution:
move your DbContext code into a .NET Standard class library and use a dummy .NET Core console app with the tools.
cd MyDbContextProject
dotnet ef migrations add MyMigration --startup-project ..\MyDummyProject

@kaajoj kaajoj self-assigned this Sep 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant