A sports activity. More...
Public Member Functions | |
SportsActivity (string name, double METS) | |
Create a new unsaved SportActivity. | |
void | Save () |
Saves changes to the database. | |
void | Delete () |
Static Public Member Functions | |
static IEnumerable < SportsActivity > | ListActivities () |
Gets a list of all available sports activities. | |
Properties | |
internal long | Id [get] |
Primary key for the underlying row. | |
string | Name [get, set] |
The name of the sports activity. | |
double | METS [get, set] |
Energy expenditure of the sports activity. | |
Private Member Functions | |
internal | SportsActivity (long activityId) |
Create a sports activity from it's underlying row id. | |
internal | SportsActivity (SportsActivityRow row) |
Create a sports activity from it's underlying row. | |
Private Attributes | |
bool | modified = true |
SportsActivityRow | row |
A sports activity.
Definition at line 11 of file SportsActivity.cs.
Foodolini.BusinessLogic.SportsActivity.SportsActivity | ( | string | name, | |
double | METS | |||
) |
Create a new unsaved SportActivity.
name | Name of the activity, human readable | |
METS | Energy expenditure of the sports activity. |
Definition at line 25 of file SportsActivity.cs.
internal Foodolini.BusinessLogic.SportsActivity.SportsActivity | ( | long | activityId | ) | [private] |
Create a sports activity from it's underlying row id.
activityId | Row id |
Definition at line 38 of file SportsActivity.cs.
internal Foodolini.BusinessLogic.SportsActivity.SportsActivity | ( | SportsActivityRow | row | ) | [private] |
Create a sports activity from it's underlying row.
row | The underlying row |
Definition at line 51 of file SportsActivity.cs.
void Foodolini.BusinessLogic.SportsActivity.Delete | ( | ) |
Permanently deletes the sports activity.
Definition at line 108 of file SportsActivity.cs.
static IEnumerable<SportsActivity> Foodolini.BusinessLogic.SportsActivity.ListActivities | ( | ) | [static] |
Gets a list of all available sports activities.
Definition at line 118 of file SportsActivity.cs.
void Foodolini.BusinessLogic.SportsActivity.Save | ( | ) |
Saves changes to the database.
Definition at line 97 of file SportsActivity.cs.
bool Foodolini.BusinessLogic.SportsActivity.modified = true [private] |
Definition at line 13 of file SportsActivity.cs.
Definition at line 14 of file SportsActivity.cs.
internal long Foodolini.BusinessLogic.SportsActivity.Id [get, private] |
Primary key for the underlying row.
Definition at line 60 of file SportsActivity.cs.
double Foodolini.BusinessLogic.SportsActivity.METS [get, set] |
Energy expenditure of the sports activity.
Definition at line 84 of file SportsActivity.cs.
string Foodolini.BusinessLogic.SportsActivity.Name [get, set] |
The name of the sports activity.
Definition at line 70 of file SportsActivity.cs.