This commit is contained in:
@@ -22,23 +22,12 @@ namespace AyaNova.Biz
|
||||
/// <param name="newEvent"></param>
|
||||
/// <param name="ct"></param>
|
||||
/// <returns></returns>
|
||||
internal static void AddEntryNoSave(Event newEvent, AyContext ct)
|
||||
internal static void AddEntry(Event newEvent, AyContext ct)
|
||||
{
|
||||
ct.Event.Add(newEvent);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Add and SAVE entry to the log
|
||||
/// </summary>
|
||||
/// <param name="newEvent"></param>
|
||||
/// <param name="ct"></param>
|
||||
/// <returns></returns>
|
||||
internal static void AddEntryAndSave(Event newEvent, AyContext ct)
|
||||
{
|
||||
ct.Event.Add(newEvent);
|
||||
ct.SaveChanges();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Handle delete
|
||||
@@ -52,8 +41,7 @@ namespace AyaNova.Biz
|
||||
internal static void DeleteObject(long userId, AyaType ayType, long ayId, string textra, AyContext ct)
|
||||
{
|
||||
ct.Database.ExecuteSqlCommand($"delete from aevent where aytype = {ayType} and ayid={ayId}");
|
||||
ct.Event.Add(new Event(userId, ayId, ayType, AyaEvent.Deleted, textra));
|
||||
ct.SaveChanges();
|
||||
ct.Event.Add(new Event(userId, ayId, ayType, AyaEvent.Deleted, textra));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user