Project 0 - 1811-nov27-net/training-code GitHub Wiki

project 0: pizza store application

November 27 2018 Arlington .NET / Nick Escalona

functionality

  • place pizza order to a location for a user
  • get a suggested order for a user based on his order history
  • search users by name
  • display details of an order
  • display all order history of a location
  • display all order history of a user
  • display order history sorted by earliest, latest, cheapest, most expensive

structure

data access

  • Entity Framework database-first scaffold
  • dbcontext and the models in its dbsets should be here
  • repository implementations should be here

class library

  • all business logic should be here
  • use repository pattern to abstract data access in terms of the class library models
  • repository interfaces should be here

user interface

  • interactive console application
  • only display-related code can be here
  • low-priority component, will be replaced when we move to project 1

unit test

  • use TDD for some of the application
  • focus on unit testing class library, testing the console app is very low priority

object model

user

  • has first name, last name, etc.
  • has a default location to order from
  • cannot place more than one order from the same location within two hours

order

  • has a location
  • has a user
  • has an order time (when the order was placed)
  • can have at most 12 pizzas
  • total value cannot exceed $500

location

  • has an inventory of pizza ingredients
  • inventory decreases when orders are accepted
  • rejects orders that cannot be fulfilled with remaining inventory
  • has order history

pizza

technologies

  • C#/.NET
  • Entity Framework
  • xUnit, NUnit, or MSTest
  • Serilog or NLog