public ClientContactDetail Update(ClientContactDetail e)
 {
     DB.ClientContactDetails.Attach(e);
     DB.ObjectStateManager.ChangeObjectState(e, System.Data.EntityState.Modified);
     Save();
     return e;
 }
        public ClientContactDetail Add(int clientContactID)
        {
            var ClientContactRepo = new ClientContactRepository() { DB = DB };
            var ClientContact = ClientContactRepo.Get(clientContactID);

            var ClientContactDetail = new ClientContactDetail();
            ClientContact.ClientContactDetails.Add(ClientContactDetail);
            Save();
            return ClientContactDetail;
        }
示例#3
0
 /// <summary>
 /// Deprecated Method for adding a new object to the ClientContactDetails EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToClientContactDetails(ClientContactDetail clientContactDetail)
 {
     base.AddObject("ClientContactDetails", clientContactDetail);
 }
示例#4
0
 /// <summary>
 /// Create a new ClientContactDetail object.
 /// </summary>
 /// <param name="id">Initial value of the ID property.</param>
 public static ClientContactDetail CreateClientContactDetail(global::System.Int32 id)
 {
     ClientContactDetail clientContactDetail = new ClientContactDetail();
     clientContactDetail.ID = id;
     return clientContactDetail;
 }