public void InsertAlergy(Alergie alergy)
 {
     if ((alergy.EntityState != EntityState.Added))
     {
         if ((alergy.EntityState != EntityState.Detached))
         {
             this.ObjectContext.ObjectStateManager.
                 ChangeObjectState(alergy, EntityState.Added);
         }
         else
         {
             this.ObjectContext.AddToAlergie(alergy);
         }
     }
 }
 private bool FilterAlergie(Alergie entity)
 {
     return (entity.DiagnozaId == this.Id);
 }
            public void UpdateAlergy(Alergie alergy)
            {
                Alergie AlergyChanges = this.ChangeSet.GetOriginal(alergy);
                if (AlergyChanges != null)
                {
                    this.ObjectContext.CreateObjectSet<Alergie>().AttachAsModified(alergy, AlergyChanges);
                }
                else
                {
                    this.ObjectContext.Alergie.Attach(alergy);
                }

                this.ObjectContext.SaveChanges();
            }
 private void AttachAlergie(Alergie entity)
 {
     entity.Cis_Diagnoza = this;
 }
 private void DetachAlergie(Alergie entity)
 {
     entity.Cis_Diagnoza = null;
 }
 private void DetachAlergie(Alergie entity)
 {
     entity.Cis_Alergeny = null;
 }
 private bool FilterAlergie(Alergie entity)
 {
     return (entity.AlergenId == this.Id);
 }
 private bool FilterAlergie(Alergie entity)
 {
     return (entity.OsCislo == this.OsCislo);
 }
 private void AttachAlergie(Alergie entity)
 {
     entity.Cis_Alergeny = this;
 }
 private void AttachAlergie(Alergie entity)
 {
     entity.IdentifikacneUdaje = this;
 }
 private void DetachAlergie(Alergie entity)
 {
     entity.IdentifikacneUdaje = null;
 }
 private bool FilterAlergie(Alergie entity)
 {
     return (entity.KlinickyPriznak == this.Id);
 }
 private void DetachAlergie(Alergie entity)
 {
     entity.Cis_KlinickePriznaky = null;
 }
 private void AttachAlergie(Alergie entity)
 {
     entity.Cis_KlinickePriznaky = this;
 }
 /// <summary>
 /// Deprecated Method for adding a new object to the Alergie EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToAlergie(Alergie alergie)
 {
     base.AddObject("Alergie", alergie);
 }
 /// <summary>
 /// Create a new Alergie object.
 /// </summary>
 /// <param name="idAlergie">Initial value of the IdAlergie property.</param>
 public static Alergie CreateAlergie(global::System.Int32 idAlergie)
 {
     Alergie alergie = new Alergie();
     alergie.IdAlergie = idAlergie;
     return alergie;
 }