public ContractorContactDetail Update(ContractorContactDetail e) { DB.ContractorContactDetails.Attach(e); DB.ObjectStateManager.ChangeObjectState(e, System.Data.EntityState.Modified); Save(); return e; }
public ContractorContactDetail Add(int contractorContactID) { var contractorContactRepo = new ContractorContactRepository() { DB = DB }; var contractorContact = contractorContactRepo.Get(contractorContactID); var contractorContactDetail = new ContractorContactDetail(); contractorContact.ContractorContactDetails.Add(contractorContactDetail); Save(); return contractorContactDetail; }
/// <summary> /// Deprecated Method for adding a new object to the ContractorContactDetails EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToContractorContactDetails(ContractorContactDetail contractorContactDetail) { base.AddObject("ContractorContactDetails", contractorContactDetail); }
/// <summary> /// Create a new ContractorContactDetail object. /// </summary> /// <param name="id">Initial value of the ID property.</param> public static ContractorContactDetail CreateContractorContactDetail(global::System.Int32 id) { ContractorContactDetail contractorContactDetail = new ContractorContactDetail(); contractorContactDetail.ID = id; return contractorContactDetail; }