Exemplo n.º 1
0
 /// <summary>
 /// Gère la suppression en cascade.
 /// This entity type is the dependent end in at least one association that performs cascade deletes.
 /// This event handler will process notifications that occur when the principal end is deleted.
 /// </summary>
 internal void HandleCascadeDelete(object sender, ObjectStateChangingEventArgs e)
 {
     if (e.NewState == ObjectState.Deleted)
     {
         this.MarkAsDeleted();
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// Gère le changement d'état de l'objet.
 /// </summary>
 /// <param name="sender">La source.</param>
 /// <param name="e">Les <see cref="KProcess.Ksmed.Models.ObjectStateChangingEventArgs"/> contenant les données de l'évènement.</param>
 private void HandleObjectStateChanging(object sender, ObjectStateChangingEventArgs e)
 {
     if (e.NewState == ObjectState.Deleted)
     {
         ClearNavigationProperties();
     }
 }