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; }
/// <summary> /// Deprecated Method for adding a new object to the ClientContactDetails EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToClientContactDetails(ClientContactDetail clientContactDetail) { base.AddObject("ClientContactDetails", clientContactDetail); }
/// <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; }