public void UpdateContact(Kontakt contact)
            {
                Kontakt ContactChanges = this.ChangeSet.GetOriginal(contact);
                if (ContactChanges != null)
                {
                    this.ObjectContext.CreateObjectSet<Kontakt>().AttachAsModified(contact, ContactChanges);
                }
                else
                {
                    this.ObjectContext.Kontakt.Attach(contact);
                }

                this.ObjectContext.SaveChanges();
            }
 public void InsertContact(Kontakt contact)
 {
     if ((contact.EntityState != EntityState.Added))
     {
         if ((contact.EntityState != EntityState.Detached))
         {
             this.ObjectContext.ObjectStateManager.
                 ChangeObjectState(contact, EntityState.Added);
         }
         else
         {
             this.ObjectContext.AddToKontakt(contact);
         }
     }
 }
 /// <summary>
 /// Deprecated Method for adding a new object to the Kontakt EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToKontakt(Kontakt kontakt)
 {
     base.AddObject("Kontakt", kontakt);
 }
 private bool FilterKontakt1(Kontakt entity)
 {
     return (entity.IdKontaktu == this.Kontakt);
 }
 /// <summary>
 /// Create a new Kontakt object.
 /// </summary>
 /// <param name="idKontaktu">Initial value of the IdKontaktu property.</param>
 public static Kontakt CreateKontakt(global::System.Int32 idKontaktu)
 {
     Kontakt kontakt = new Kontakt();
     kontakt.IdKontaktu = idKontaktu;
     return kontakt;
 }