示例#1
0
 /// <summary>
 /// Create a new Subject object.
 /// </summary>
 /// <param name="id">Initial value of the ID property.</param>
 /// <param name="name">Initial value of the Name property.</param>
 /// <param name="timeStamp">Initial value of the TimeStamp property.</param>
 /// <param name="isDeleted">Initial value of the IsDeleted property.</param>
 public static Subject CreateSubject(global::System.String id, global::System.String name, global::System.Byte[] timeStamp, global::System.Boolean isDeleted)
 {
     Subject subject = new Subject();
     subject.ID = id;
     subject.Name = name;
     subject.TimeStamp = timeStamp;
     subject.IsDeleted = isDeleted;
     return subject;
 }
示例#2
0
 /// <summary>
 /// Deprecated Method for adding a new object to the Subjects EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToSubjects(Subject subject)
 {
     base.AddObject("Subjects", subject);
 }
示例#3
0
 public ActionResult AddSubject(Subject subject)
 {
     db.Subjects.AddObject(subject);
     db.SaveChanges();
     return RedirectToAction("Index","Subject");
 }