MenuCreationController Members

TriCodeTest

MenuCreationController Members

The MenuCreationController type exposes the following members.

Constructors


  Name Description
Public method MenuCreationController
Initializes a new instance of the MenuCreationController class.

Methods


  Name Description
Public method AddAddon
Takes an Addon Model Object and adds it to the database
Public method AddCategory
Adds the specified category object to the database and returns that updated category
Public method AddIngredient
Add a new Ingredient to the database and return that new ingredient
Public method AddMenuItem
Add a new menu item to the database and return that updated object
Public method AddMenuItemIngredient
Map a new menu item ingredient to the specified menu item and add it to the database
Public method AddSubcategory
Add a new subcategory to the database
Private method CategoryExists
Check if a category exists in the database.
Public method EditCategory
Edits a given Category with new data specified by the parameters.
Public method EditMenuItem
Edit a specific menu item with new data in the database.
Public method EditSubcategory
Given a subcategory model object update the existing subcategory in the database with the new data
Public method GetAddons
Returns a list of the addons with the specific subcategory id.
Public method GetIngredients
Retrieves a list of Ingredient objects from the database and returns that list to the caller.
Public method GetItemImage
Given a menu item id retrieves a menu item and returns the menu item image.
Public method GetMenuItem
Retrieve a menu item from the database with a specific id
Public method GetMenuItemIngredients
Get a list of menu item ingredients attached to a specific menu item then return that list.
Public method GetSubcategory
Get request for a specific subcategory with a specific id
Public method Index
Index listener for MenuCreationController. This is antiquated at this point.
Public method Menu
Main menu creation page generation. Takes all menu data from the Menu tables then uses the MenuCreationViewModel to cast that data to a list so the menu creation page can use it to populate the page with menu data.
Public method RemoveAddon
Given an addon id search the database and remove the addon with that id.
Public method RemoveCategory
Removes a Category specified by its Id.
Public method RemoveIngredient
Remove an ingredient from the database.
Public method RemoveMenuItem
Remove a menuitem from the database with a specific id
Public method RemoveMenuItemIngredient
Remove the mapping of an ingredient to a menu item and return true when it succeeds.
Public method RemoveSubcategory
Removes a subcategory from the database given that subcategories Id. Returns true when completed.
Public method UpdateItemImage
Update a menu item with a new image. Takes the id of the menu item to update, and a base64 image string and converts that string to a byte array to store in in the database.

Fields


  Name Description
Private field _context