Welcome, new Bangazonians!
Your job is to build out a .NET Web API that makes each resource in the Bangazon ERD available to application developers throughout the entire company.
Pro tip: You do not need to make a Controller for the join tables, because those aren't resources.
Your product owner will provide you with a prioritized backlog of features for you to work on over the development sprint. The first version of the API will be completely open since we have not determined which authentication method we want to use yet.
The only restriction on the API is that only requests from the www.bangazon.com
domain should be allowed. Requests from that domain should be able to access every resource, and perform any operation a resource.
First, you need to plan. Your team needs to come to a consensus about the Bangazon ERD design. Once you feel you have consensus, you must get it approved by your manager before you begin writing code for the API.
Next, you need to author the Models needed for your API. Make sure that each model has the approprate foreign key relationship defined on it, either with a custom type or an List<T>
to store many related things. The boilerplate code shows you one example - the relationship between Order
and OrderProduct
, which is 1 -> ∞. For every OrderId, it can be stored in the OrderProduct
table many times.
Your team will need to decide on a file to be added to your repository to contain all of the SQL needed to build and seed your database. Perhaps a file named bangazon.sql
.
If your database needs to be changed in any way, or you wish to add items to be seeded, the a teammate will need to modify the file, submit a PR, and each teammate will need to run it to rebuild the database with the new structure.
Now it's time to build the controllers that handle GET, POST, PUT, and DELETE operations on each resource. Make sure you read, and understand, the requirements in the issue tickets to you can use your ORM and SQL to return the correct data structure to client requests.