This commit is contained in:
2019-07-02 23:35:11 +00:00
parent 690b7d41d9
commit e4996d683d
3 changed files with 49 additions and 0 deletions

View File

@@ -90,6 +90,7 @@ namespace AyaNova.Biz
outObj.Serial = ServerBootConfig.WIDGET_SERIAL.GetNext();
outObj.Tags = TagUtil.NormalizeTags(outObj.Tags);
outObj.CustomFields=JsonUtil.CompactJson(outObj.CustomFields);
await ct.Widget.AddAsync(outObj);
await ct.SaveChangesAsync();
@@ -117,6 +118,7 @@ namespace AyaNova.Biz
//Test get serial id visible id number from generator
outObj.Serial = ServerBootConfig.WIDGET_SERIAL.GetNext();
outObj.Tags = TagUtil.NormalizeTags(outObj.Tags);
outObj.CustomFields=JsonUtil.CompactJson(outObj.CustomFields);
TempContext.Widget.Add(outObj);
TempContext.SaveChanges();
@@ -174,6 +176,7 @@ namespace AyaNova.Biz
CopyObject.Copy(inObj, dbObj, "Id,Serial");
dbObj.Tags = TagUtil.NormalizeTags(dbObj.Tags);
dbObj.CustomFields=JsonUtil.CompactJson(dbObj.CustomFields);
//Set "original" value of concurrency token to input token
//this will allow EF to check it out
@@ -207,6 +210,7 @@ namespace AyaNova.Biz
objectPatch.ApplyTo(dbObj);
dbObj.Tags = TagUtil.NormalizeTags(dbObj.Tags);
dbObj.CustomFields=JsonUtil.CompactJson(dbObj.CustomFields);
ct.Entry(dbObj).OriginalValues["ConcurrencyToken"] = concurrencyToken;
Validate(dbObj, SnapshotOfOriginalDBObj);