Skip to content

Instantly share code, notes, and snippets.

@YuriyZaletskyy
Created November 23, 2020 19:42
Show Gist options
  • Save YuriyZaletskyy/9695027bf9243bdda3361bb61cefcd9c to your computer and use it in GitHub Desktop.
Save YuriyZaletskyy/9695027bf9243bdda3361bb61cefcd9c to your computer and use it in GitHub Desktop.
myHub.On<NotificationResult>("ReceiveNotification", nr =>
{
if (nr.Inserted.Length > 0 && nr.Deleted.Length > 0)
{
MessageBox.Show("Before update " + JsonConvert.DeserializeObject(nr.Deleted[0].ToString()));
MessageBox.Show("After update " + JsonConvert.DeserializeObject(nr.Inserted[0].ToString()));
}
else
{
if (nr.Inserted.Length > 0)
MessageBox.Show("Inserted " + JsonConvert.DeserializeObject(nr.Inserted[0].ToString()));
if (nr.Deleted.Length > 0)
MessageBox.Show("Deleted " + JsonConvert.DeserializeObject(nr.Deleted[0].ToString()));
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment