Exemple #1
0
 public void DeleteOfficeAssignment(OfficeAssignment officeAssignment)
 {
     try
     {
         schoolRepository.DeleteOfficeAssignment(officeAssignment);
     }
     catch (Exception ex)
     {
         //Include catch blocks for specific exceptions first,
         //and handle or log the error as appropriate in each.
         //Include a generic catch block like this one last.
         throw ex;
     }
 }
 /// <summary>
 /// Create a new OfficeAssignment object.
 /// </summary>
 /// <param name="instructorID">Initial value of the InstructorID property.</param>
 /// <param name="location">Initial value of the Location property.</param>
 /// <param name="timestamp">Initial value of the Timestamp property.</param>
 public static OfficeAssignment CreateOfficeAssignment(global::System.Int32 instructorID, global::System.String location, global::System.Byte[] timestamp)
 {
     OfficeAssignment officeAssignment = new OfficeAssignment();
     officeAssignment.InstructorID = instructorID;
     officeAssignment.Location = location;
     officeAssignment.Timestamp = timestamp;
     return officeAssignment;
 }
 /// <summary>
 /// Deprecated Method for adding a new object to the OfficeAssignments EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToOfficeAssignments(OfficeAssignment officeAssignment)
 {
     base.AddObject("OfficeAssignments", officeAssignment);
 }
 public void UpdateOfficeAssignment(OfficeAssignment officeAssignment, OfficeAssignment origOfficeAssignment)
 {
     officeAssignments.Remove(origOfficeAssignment);
     officeAssignments.Add(officeAssignment);
 }
 public void InsertOfficeAssignment(OfficeAssignment officeAssignment)
 {
     officeAssignments.Add(officeAssignment);
 }
 public void DeleteOfficeAssignment(OfficeAssignment officeAssignment)
 {
     officeAssignments.Remove(officeAssignment);
 }