This commit is contained in:
@@ -13,7 +13,7 @@ namespace AyaNova.Biz
|
||||
{
|
||||
internal static class EventLogProcessor
|
||||
{
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Add an entry to the log
|
||||
///
|
||||
@@ -21,13 +21,13 @@ namespace AyaNova.Biz
|
||||
/// <param name="newEvent"></param>
|
||||
/// <param name="ct"></param>
|
||||
/// <returns></returns>
|
||||
internal static void LogEventToDatabase(Event newEvent, AyContext ct)
|
||||
internal static void LogEventToDatabaseAndSaveEntireContext(Event newEvent, AyContext ct)
|
||||
{
|
||||
ct.Event.Add(newEvent);
|
||||
ct.SaveChanges();
|
||||
ct.Event.Add(newEvent);
|
||||
ct.SaveChanges();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Handle delete
|
||||
@@ -41,7 +41,7 @@ namespace AyaNova.Biz
|
||||
internal static void DeleteObject(long userId, AyaType ayType, long ayId, string textra, AyContext ct)
|
||||
{
|
||||
ct.Database.ExecuteSqlInterpolated($"delete from aevent where aytype = {ayType} and ayid={ayId}");
|
||||
ct.Event.Add(new Event(userId, ayId, ayType, AyaEvent.Deleted, textra));
|
||||
ct.Event.Add(new Event(userId, ayId, ayType, AyaEvent.Deleted, textra));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user