This commit is contained in:
2018-08-23 20:53:38 +00:00
parent a1e1eb9376
commit 0ed23e0590
2 changed files with 2 additions and 1 deletions

View File

@@ -38,7 +38,7 @@ namespace AyaNova.Biz
/// <param name="ct"></param>
internal static void DeleteObject(long userId, AyaType ayType, long ayId, string textra, AyContext ct)
{
ct.Database.ExecuteSqlCommand("delete from aevent where aytype = {0} and ayid={1}", new object[] { (int)ayType }, new object[] { ayId });
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();
}

View File

@@ -35,6 +35,7 @@ namespace AyaNova.Models
Created = System.DateTime.UtcNow;
OwnerId = ownerId;
AyId = ayId;
AyType=ayType;
AyEvent = ayEvent;
if (textra != null)
{