public void UpdateCharacteristic(CharakteristikaPacienta characteristic)
            {
                CharakteristikaPacienta CharacteristicChanges = this.ChangeSet.GetOriginal(characteristic);
                if (CharacteristicChanges != null)
                {
                    this.ObjectContext.CreateObjectSet<CharakteristikaPacienta>().AttachAsModified(characteristic, CharacteristicChanges);
                }
                else
                {
                    this.ObjectContext.CharakteristikaPacienta.Attach(characteristic);
                }

                this.ObjectContext.SaveChanges();
            }
 public void InsertCharacteristic(CharakteristikaPacienta characetristic)
 {
     if ((characetristic.EntityState != EntityState.Added))
     {
         if ((characetristic.EntityState != EntityState.Detached))
         {
             this.ObjectContext.ObjectStateManager.
                 ChangeObjectState(characetristic, EntityState.Added);
         }
         else
         {
             this.ObjectContext.AddToCharakteristikaPacienta(characetristic);
         }
     }
 }
 private bool FilterCharakteristikaPacienta(CharakteristikaPacienta entity)
 {
     return (entity.OsCislo == this.OsCislo);
 }
 /// <summary>
 /// Deprecated Method for adding a new object to the CharakteristikaPacienta EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToCharakteristikaPacienta(CharakteristikaPacienta charakteristikaPacienta)
 {
     base.AddObject("CharakteristikaPacienta", charakteristikaPacienta);
 }
 /// <summary>
 /// Create a new CharakteristikaPacienta object.
 /// </summary>
 /// <param name="osCislo">Initial value of the OsCislo property.</param>
 public static CharakteristikaPacienta CreateCharakteristikaPacienta(global::System.Int32 osCislo)
 {
     CharakteristikaPacienta charakteristikaPacienta = new CharakteristikaPacienta();
     charakteristikaPacienta.OsCislo = osCislo;
     return charakteristikaPacienta;
 }
Пример #6
0
     private void FixupCharakteristikaPacienta(CharakteristikaPacienta previousValue)
     {
         if (previousValue != null && ReferenceEquals(previousValue.IdentifikacneUdaje, this))
         {
             previousValue.IdentifikacneUdaje = null;
         }
 
         if (CharakteristikaPacienta != null)
         {
             CharakteristikaPacienta.IdentifikacneUdaje = this;
         }
     }