A shopping list item that contains ingredients and recipes. More...
Public Member Functions | |
ShoppingListItem (Ingredient ingredient, double quantity, Person owner) | |
ShoppingListItem (Recipe recipe, Ingredient ingredient, double quantity, Person owner) | |
void | Save () |
Saves the shopping list item to the database. | |
void | Delete () |
Properties | |
internal long | Id [get] |
Unique identifer. | |
Person | Owner [get, set] |
The owner of the shopping list item. | |
Recipe | Recipe [get, set] |
Gets the associated Recipe. | |
double | Quantity [get, set] |
The amount of this item. | |
Ingredient | Ingredient [get, set] |
The associated ingredient. | |
Private Member Functions | |
internal | ShoppingListItem (ShoppingListItemRow row) |
Static Private Member Functions | |
static internal IEnumerable < ShoppingListItem > | GetShoppingListItems (Person owner) |
Loads all shopping list items owned by the provided user. | |
Private Attributes | |
ShoppingListItemRow | row |
bool | modified = false |
Recipe | recipe |
cached recipe instance. | |
Ingredient | ingredient |
A shopping list item that contains ingredients and recipes.
Definition at line 12 of file ShoppingListItem.cs.
Foodolini.BusinessLogic.ShoppingListItem.ShoppingListItem | ( | Ingredient | ingredient, | |
double | quantity, | |||
Person | owner | |||
) |
Definition at line 17 of file ShoppingListItem.cs.
Foodolini.BusinessLogic.ShoppingListItem.ShoppingListItem | ( | Recipe | recipe, | |
Ingredient | ingredient, | |||
double | quantity, | |||
Person | owner | |||
) |
Definition at line 25 of file ShoppingListItem.cs.
internal Foodolini.BusinessLogic.ShoppingListItem.ShoppingListItem | ( | ShoppingListItemRow | row | ) | [private] |
Definition at line 34 of file ShoppingListItem.cs.
void Foodolini.BusinessLogic.ShoppingListItem.Delete | ( | ) |
Definition at line 139 of file ShoppingListItem.cs.
static internal IEnumerable<ShoppingListItem> Foodolini.BusinessLogic.ShoppingListItem.GetShoppingListItems | ( | Person | owner | ) | [static, private] |
Loads all shopping list items owned by the provided user.
owner |
Definition at line 120 of file ShoppingListItem.cs.
void Foodolini.BusinessLogic.ShoppingListItem.Save | ( | ) |
Saves the shopping list item to the database.
Definition at line 130 of file ShoppingListItem.cs.
Definition at line 97 of file ShoppingListItem.cs.
bool Foodolini.BusinessLogic.ShoppingListItem.modified = false [private] |
Definition at line 15 of file ShoppingListItem.cs.
cached recipe instance.
Definition at line 61 of file ShoppingListItem.cs.
Definition at line 14 of file ShoppingListItem.cs.
internal long Foodolini.BusinessLogic.ShoppingListItem.Id [get, private] |
Unique identifer.
Definition at line 44 of file ShoppingListItem.cs.
Ingredient Foodolini.BusinessLogic.ShoppingListItem.Ingredient [get, set] |
The associated ingredient.
Definition at line 102 of file ShoppingListItem.cs.
Person Foodolini.BusinessLogic.ShoppingListItem.Owner [get, set] |
The owner of the shopping list item.
Definition at line 52 of file ShoppingListItem.cs.
double Foodolini.BusinessLogic.ShoppingListItem.Quantity [get, set] |
The amount of this item.
Definition at line 88 of file ShoppingListItem.cs.
Recipe Foodolini.BusinessLogic.ShoppingListItem.Recipe [get, set] |
Gets the associated Recipe.
Definition at line 66 of file ShoppingListItem.cs.