This commit is contained in:
2021-06-29 18:02:12 +00:00
parent 0ee5f7c598
commit fe541dcacd
24 changed files with 658 additions and 658 deletions

View File

@@ -52,30 +52,30 @@ namespace AyaNova.Biz
}
}
////////////////////////////////////////////////////////////////////////////////////////////////
//DUPLICATE
//
internal async Task<NotifySubscription> DuplicateAsync(long id)
{
// ////////////////////////////////////////////////////////////////////////////////////////////////
// //DUPLICATE
// //
// internal async Task<NotifySubscription> DuplicateAsync(long id)
// {
var dbObject = await GetAsync(id, false);
if (dbObject == null)
{
AddError(ApiErrorCode.NOT_FOUND, "id");
return null;
}
NotifySubscription newObject = new NotifySubscription();
CopyObject.Copy(dbObject, newObject);
// var dbObject = await GetAsync(id, false);
// if (dbObject == null)
// {
// AddError(ApiErrorCode.NOT_FOUND, "id");
// return null;
// }
// NotifySubscription newObject = new NotifySubscription();
// CopyObject.Copy(dbObject, newObject);
newObject.Id = 0;
newObject.Concurrency = 0;
await ct.NotifySubscription.AddAsync(newObject);
await ct.SaveChangesAsync();
await EventLogProcessor.LogEventToDatabaseAsync(new Event(UserId, newObject.Id, BizType, AyaEvent.Created), ct);
//await SearchIndexAsync(newObject, true);
await TagBiz.ProcessUpdateTagsInRepositoryAsync(ct, newObject.Tags, null);
return newObject;
}
// newObject.Id = 0;
// newObject.Concurrency = 0;
// await ct.NotifySubscription.AddAsync(newObject);
// await ct.SaveChangesAsync();
// await EventLogProcessor.LogEventToDatabaseAsync(new Event(UserId, newObject.Id, BizType, AyaEvent.Created), ct);
// //await SearchIndexAsync(newObject, true);
// await TagBiz.ProcessUpdateTagsInRepositoryAsync(ct, newObject.Tags, null);
// return newObject;
// }
////////////////////////////////////////////////////////////////////////////////////////////////
// GET