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;
        }
Exemplo n.º 3
0
 /// <summary>
 /// Deprecated Method for adding a new object to the ContractorContactDetails EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToContractorContactDetails(ContractorContactDetail contractorContactDetail)
 {
     base.AddObject("ContractorContactDetails", contractorContactDetail);
 }
Exemplo n.º 4
0
 /// <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;
 }