Foodolini.BusinessLogic.ShoppingListItem Class Reference

A shopping list item that contains ingredients and recipes. More...

Collaboration diagram for Foodolini.BusinessLogic.ShoppingListItem:
Collaboration graph

List of all members.

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

Detailed Description

A shopping list item that contains ingredients and recipes.

Definition at line 12 of file ShoppingListItem.cs.


Constructor & Destructor Documentation

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.


Member Function Documentation

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.

Parameters:
owner 
Returns:

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.


Member Data Documentation

Definition at line 97 of file ShoppingListItem.cs.

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.


Property Documentation

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.


The documentation for this class was generated from the following file:

Foodolini 1.0.0 Documentation, generated with DoxyGen.