public void AddBranch(Branch branch) { entities.AddToBranches(branch); entities.SaveChanges(); }
/// <summary> /// Create a new Branch object. /// </summary> /// <param name="id">Initial value of the ID property.</param> /// <param name="name">Initial value of the Name property.</param> public static Branch CreateBranch(global::System.Int32 id, global::System.String name) { Branch branch = new Branch(); branch.ID = id; branch.Name = name; return branch; }
public void AssignSubject(Branch branch, Subject subject, int level) { entities.AddToBranchSubjectAssignments(new BranchSubjectAssignment() { Branch = branch, Subject = subject, Level = level }); entities.SaveChanges(); }
/// <summary> /// Deprecated Method for adding a new object to the Branches EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToBranches(Branch branch) { base.AddObject("Branches", branch); }