CustomerMenuController Methods

TriCodeTest

CustomerMenuController Methods

The CustomerMenuController type exposes the following members.

Methods


  Name Description
Private method AddNewOrderToDatabase
Creates a new empty cart if a cart hasn't been created already
Private method CalculateTotalPrice
Calculates total price of order
Public method Cart
Returns a view with the order of the current logged in user
Private method ConvertToOrderMenuItem
Converts item to view model containing choice of addons tha can be added
Public method EditItem(Nullable<(Of <<'(Int32>)>>))
Returns view containing item passed in to be able to edit it
Public method EditItem(CartOrderMenuItem)
Updates the edited item in the database
Private method GetCurrentUserAsync
Gets the current user asynchronous.
Public method Index
Receives all items needed to build the menu from the database and returns them as an object with lists
Private method OrderDeserialize
Deserializes an Order and converts it to the view model
Private method OrderSerialize
Serializes a view model and converts it to an Order
Public method PostMenuItemToCart
Adds single menu item to cart
Public method RemoveItem
Removes passed item from user's cart
Public method SubmitOrder
Submits the order and changes it's status from Cart to Received