-
Notifications
You must be signed in to change notification settings - Fork 38
Your Online Shopping List Part 1 Backend
We all go shopping from time to time. However, we sometimes forget what actually needs buying. This results in buying not enough or too much stuff, sometimes not even necessary stuff. There are many different ways of creating shopping lists and a ton of apps that do it for you, but this time, we will create one ourselves. It is a good exercise because it helps us understand the following:
- How to save data?
- How to have data accessible throughout different devices?
- What is HTTP and how does that help work with data?
- How to securely save our work (code)?
This is a two-part problem, where we first get the backend part (web service) figured and then move on to the frontend (react).
Create models for: a shopping item and a shopping list:
- Item should have price (total), name, amount.
- Shopping list should have many items, shop name and address, total money spent, id.
Create an endpoint that accepts a new shopping list and saves it.
Create an endpoint that accepts a shopping item with a reference to a shopping list and adds it to that list. Make sure duplicate items are not added.
Create an endpoint to get a shopping list by id
Create an endpoint to get a shopping list by id.
Create an endpoint that deletes all shopping lists.
Create an endpoint to get all the existing shopping lists.
In case a shopping item is a duplicate, merge the amounts with the existing item.
If an invalid body of a shopping list is sent- return bad request status code.
A shopping list must be accessible from outside of your machine.
You should not be able to save duplicate shopping lists. If a shopping list of the same id is being saved- prevent that by returning a conflict status code.
If a shopping list does not exist, a not found status code should be returned.
Fundamentals of practical programming
Problem 1: International Recipe ConverterLesson 1: C# Keywords and User Input
Lesson 2: Control Flow, Array and string
Lesson 3: Files, error handling and debugging
Lesson 4: Frontend using WinForms
RESTful Web API and More Fundamentals
Problem 2: Your Online Shopping ListLesson 5: RESTful, objects and JSON
Lesson 6: Code versioning
Lesson 7: OOP
Lesson 8: Understanding WebApi & Dependency Injection
Lesson 9: TDD
Lesson 10: LINQ and Collections
Lesson 11: Entity Framework
Lesson 12: Databases and SQL