This commit is contained in:
2020-07-23 22:43:58 +00:00
parent 57921d9488
commit 16a0553291
8 changed files with 12 additions and 14 deletions

View File

@@ -76,7 +76,9 @@ namespace AyaNova.Biz
//this will likely be a development error, not a production error so no need to log etc
throw new System.ArgumentException("NotifyEventProcessor:AddGeneralNotifyEvent: GeneralNotification requires a user id but none was specified");
}
var UserName = await ct.User.Where(z => z.Id == userId).Select(z => z.Name).FirstOrDefaultAsync();
NotifyEvent n = new NotifyEvent() { EventType = eventType, UserId = userId, Message = message, NotifySubscriptionId = 0, Name = UserName };
await ct.NotifyEvent.AddAsync(n);
await ct.SaveChangesAsync();