상속: System.Data.Objects.DataClasses.EntityObject
예제 #1
0
 /// <summary>
 /// Deprecated Method for adding a new object to the RaceAthletes EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToRaceAthletes(RaceAthlete raceAthlete)
 {
     base.AddObject("RaceAthletes", raceAthlete);
 }
예제 #2
0
        public void ConnectToRace(int raceId)
        {
            Entities context = new Entities();
            RaceAthlete raceAthlete = new RaceAthlete();
            raceAthlete.AthleteId = Id;
            raceAthlete.RaceId = raceId;

            if (StartNumber.HasValue) raceAthlete.Startnumber = StartNumber.Value;
            context.RaceAthletes.AddObject(raceAthlete);
            context.SaveChanges();
        }
예제 #3
0
 /// <summary>
 /// Create a new RaceAthlete object.
 /// </summary>
 /// <param name="raceId">Initial value of the RaceId property.</param>
 /// <param name="athleteId">Initial value of the AthleteId property.</param>
 public static RaceAthlete CreateRaceAthlete(global::System.Int32 raceId, global::System.Int32 athleteId)
 {
     RaceAthlete raceAthlete = new RaceAthlete();
     raceAthlete.RaceId = raceId;
     raceAthlete.AthleteId = athleteId;
     return raceAthlete;
 }