Ejemplo n.º 1
0
        private void EntityChangeObserver_Changed(object sender, EntityChangeEventArgs e)
        {
            if (e.Entry.Entity.GetType() != typeof(BlogSettings))
            {
                return;
            }

            Thread.Sleep(_source.ReloadDelay);
            Load();
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Let the EntityChangeObserver know an entity has changed.
 /// </summary>
 /// <param name="e">Event arguments for events relating to tracked Microsoft.EntityFrameworkCore.ChangeTracking.EntityEntrys.</param>
 public void OnChanged(EntityChangeEventArgs e)
 {
     ThreadPool.QueueUserWorkItem((_) => Changed?.Invoke(this, e));
 }