C# Class ITimeU.Models.AthleteModel

Show file Open project: heinek/ITimeU Class Usage Examples

Private Properties

Property Type Description
CreateDbEntity int
SetDefaultId void
TryToGetById AthleteModel
createAthleteDbFrom Athlete
updateDbEntity void
updateProperties void

Public Methods

Method Description
AthleteModel ( ) : System
AthleteModel ( Athlete athleteDb ) : System
AthleteModel ( int id ) : System
AthleteModel ( string firstName, string lastName ) : System
AthleteModel ( string firstName, string lastName, int birthday, ClubModel club, AthleteClassModel athleteClass, int startNumber, int id = EMPTY_ID ) : System
AthleteModel ( string firstName, string lastName, string email, string address, string postalcode, string city, string gender, int birthday, string phonenumber, int startNumber, ClubModel club, AthleteClassModel athleteClass ) : System
ConnectToRace ( int raceId ) : void
Delete ( ) : void
DeleteFromDb ( ) : void

Deletes the given athlete.

GetAll ( ) : List

Retrieves all athletes in the database.

GetAllByClubId ( int id ) : List
GetAthletes ( int clubId ) : List
GetAthletesForRace ( int raceId ) : List
GetById ( int idToGet ) : AthleteModel
RemoveFromRace ( int raceid ) : void
SaveToDb ( ) : void
SaveToDb ( List athletes ) : void

Saves a list of athletes to the database.

StartnumberExistsInDb ( int startnumber ) : bool

Startnumbers the exists in db.

ToString ( ) : string

Private Methods

Method Description
CreateDbEntity ( Entities context ) : int
SetDefaultId ( ) : void
TryToGetById ( int idToGet, Entities entities ) : AthleteModel
createAthleteDbFrom ( AthleteModel athlete ) : Athlete
updateDbEntity ( Entities context ) : void
updateProperties ( Athlete athlete ) : void

Method Details

AthleteModel() public method

public AthleteModel ( ) : System
return System

AthleteModel() public method

public AthleteModel ( Athlete athleteDb ) : System
athleteDb Athlete
return System

AthleteModel() public method

public AthleteModel ( int id ) : System
id int
return System

AthleteModel() public method

public AthleteModel ( string firstName, string lastName ) : System
firstName string
lastName string
return System

AthleteModel() public method

public AthleteModel ( string firstName, string lastName, int birthday, ClubModel club, AthleteClassModel athleteClass, int startNumber, int id = EMPTY_ID ) : System
firstName string
lastName string
birthday int
club ClubModel
athleteClass AthleteClassModel
startNumber int
id int
return System

AthleteModel() public method

public AthleteModel ( string firstName, string lastName, string email, string address, string postalcode, string city, string gender, int birthday, string phonenumber, int startNumber, ClubModel club, AthleteClassModel athleteClass ) : System
firstName string
lastName string
email string
address string
postalcode string
city string
gender string
birthday int
phonenumber string
startNumber int
club ClubModel
athleteClass AthleteClassModel
return System

ConnectToRace() public method

public ConnectToRace ( int raceId ) : void
raceId int
return void

Delete() public method

public Delete ( ) : void
return void

DeleteFromDb() public method

Deletes the given athlete.
public DeleteFromDb ( ) : void
return void

GetAll() public static method

Retrieves all athletes in the database.
public static GetAll ( ) : List
return List

GetAllByClubId() public method

public GetAllByClubId ( int id ) : List
id int
return List

GetAthletes() public static method

public static GetAthletes ( int clubId ) : List
clubId int
return List

GetAthletesForRace() public static method

public static GetAthletesForRace ( int raceId ) : List
raceId int
return List

GetById() public static method

public static GetById ( int idToGet ) : AthleteModel
idToGet int
return AthleteModel

RemoveFromRace() public method

public RemoveFromRace ( int raceid ) : void
raceid int
return void

SaveToDb() public method

public SaveToDb ( ) : void
return void

SaveToDb() public static method

Saves a list of athletes to the database.
public static SaveToDb ( List athletes ) : void
athletes List The list of athletes to save.
return void

StartnumberExistsInDb() public static method

Startnumbers the exists in db.
public static StartnumberExistsInDb ( int startnumber ) : bool
startnumber int The startnumber.
return bool

ToString() public method

public ToString ( ) : string
return string