- Schema:
- To do:
- create relationship from schema
- from user input add new product
- create supplier and link it to newly added product
- Reference:
- Solution:
- Schema:
- To do:
- change relationship from exercise 1 to Many-to-One
- add few products and link them to supplier
- Reference:
- Solution:
- Schema:
- To do:
- merge relationships from exercise 1 and 2
- show how to link supplier to products in each way
- Reference:
- Solution:
- Schema:
- To do:
- create relationship from schema
- list all products from one invoice
- show invoices containing chosen product
- Reference:
- Solution:
- Schema:
- To do:
- create relationship from schema using TPH strategy
- fill tables with example data
- use three different types of query to access your data
- Reference:
- Solution:
- To do:
- modify inheritance strategy from exercise 5 to TPT
- Reference
- Solution:
- Visual Studio
- It's recommended to use Visual Studio for setting up project.
- Create project
- To create new project follow guide.
- Open project
- Clone repository and switch to branch with solution number.
- Open Visual Studio and select from menu:
File -> Open -> Project/Solution
- Pick
App.sln
fromApp
directory of solution
Open project in Visual Studio and press run button located on the top bar:
- Results:
- Terminal with results will show up.
- Modified database will be available in project location under path:
bin/Debug/netcoreapp3.1/DatabaseName.db
- You can open it using for example DB Browser for SQLite.
- Exception:
- If
Microsoft.EntityFrameworkCore.DbUpdateException
raises go to: Solution Explorer -> Right click on database -> Properites -> Copy to Output Directory
- Set it to:
Copy if newer
if you want update database in each run of programCopy always
if you want to clean database before each run of program
- If
- Troubleshooting:
- Check setup guide in case of any other problems.
Adrian Niec
This project is under the MIT License