Inheritance: System.Data.Objects.DataClasses.EntityObject
コード例 #1
0
 /// <summary>
 /// Deprecated Method for adding a new object to the Contests EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToContests(Contest contest)
 {
     base.AddObject("Contests", contest);
 }
コード例 #2
0
 /// <summary>
 /// Create a new Contest object.
 /// </summary>
 /// <param name="id">Initial value of the Id property.</param>
 /// <param name="name">Initial value of the Name property.</param>
 /// <param name="createdDate">Initial value of the CreatedDate property.</param>
 /// <param name="deadline">Initial value of the Deadline property.</param>
 /// <param name="description">Initial value of the Description property.</param>
 /// <param name="status">Initial value of the Status property.</param>
 /// <param name="mininumVoteNumber">Initial value of the MininumVoteNumber property.</param>
 /// <param name="maximumVoteNumber">Initial value of the MaximumVoteNumber property.</param>
 public static Contest CreateContest(global::System.Int32 id, global::System.String name, global::System.DateTime createdDate, global::System.DateTime deadline, global::System.String description, global::System.Byte status, global::System.Int32 mininumVoteNumber, global::System.Int32 maximumVoteNumber)
 {
     Contest contest = new Contest();
     contest.Id = id;
     contest.Name = name;
     contest.CreatedDate = createdDate;
     contest.Deadline = deadline;
     contest.Description = description;
     contest.Status = status;
     contest.MininumVoteNumber = mininumVoteNumber;
     contest.MaximumVoteNumber = maximumVoteNumber;
     return contest;
 }
コード例 #3
0
 /// <summary>
 /// Add a new Contest
 /// </summary>
 /// <param name="Contest">new Contest</param>
 public void AddContest(Contest Contest)
 {
     _dbContext.Contests.AddObject(Contest);
     _dbContext.SaveChanges();
 }