This commit is contained in:
2018-10-08 18:20:10 +00:00
parent f6c9280a11
commit 40dc278310
15 changed files with 96 additions and 119 deletions

View File

@@ -63,6 +63,9 @@ namespace AyaNova.Biz
//Add it to the context so the controller can save it
ct.Locale.Add(NewLocale);
await ct.SaveChangesAsync();
//Log
EventLogProcessor.LogEventToDatabase(new Event(UserId, NewLocale.Id, AyaType.Locale, AyaEvent.Created), ct);
return NewLocale;
}
@@ -223,6 +226,10 @@ namespace AyaNova.Biz
if (HasErrors)
return false;
ct.SaveChanges();
//Log
EventLogProcessor.LogEventToDatabase(new Event(UserId, dbParent.Id, AyaType.Locale, AyaEvent.Modified), ct);
return true;
}
@@ -247,6 +254,10 @@ namespace AyaNova.Biz
if (HasErrors)
return false;
ct.SaveChanges();
//Log
EventLogProcessor.LogEventToDatabase(new Event(UserId, dbObj.Id, AyaType.Locale, AyaEvent.Modified), ct);
return true;
}
@@ -537,8 +548,7 @@ namespace AyaNova.Biz
ct.SaveChanges();
//Log now that we have the Id, note that there is no source created / modified for this so just attributing to current userId
EventLogProcessor.AddEntryToContextNoSave(new Event(UserId, l.Id, AyaType.Locale, AyaEvent.Created), ct);
ct.SaveChanges();
EventLogProcessor.LogEventToDatabase(new Event(UserId, l.Id, AyaType.Locale, AyaEvent.Created), ct);
}
break;