This commit is contained in:
@@ -99,7 +99,7 @@ namespace AyaNova.Biz
|
||||
internal async Task<NotifySubscription> PutAsync(NotifySubscription putObject)
|
||||
{
|
||||
//TODO: Must remove all prior events and replace them
|
||||
|
||||
|
||||
NotifySubscription dbObject = await ct.NotifySubscription.SingleOrDefaultAsync(z => z.Id == putObject.Id);
|
||||
if (dbObject == null)
|
||||
{
|
||||
@@ -136,8 +136,7 @@ namespace AyaNova.Biz
|
||||
//
|
||||
internal async Task<bool> DeleteAsync(long id)
|
||||
{
|
||||
throw new System.NotImplementedException("NotifySubscriptionBiz::DeleteAsync NOT IMPLEMENTED YET");
|
||||
//needs to delete notifyevent and also notifications records
|
||||
|
||||
using (var transaction = await ct.Database.BeginTransactionAsync())
|
||||
{
|
||||
try
|
||||
@@ -157,6 +156,7 @@ namespace AyaNova.Biz
|
||||
await TagBiz.ProcessDeleteTagsInRepositoryAsync(ct, dbObject.Tags);
|
||||
//await FileUtil.DeleteAttachmentsForObjectAsync(BizType, dbObject.Id, ct);
|
||||
//TODO: DELETE RELATED RECORDS HERE
|
||||
|
||||
//all good do the commit
|
||||
await transaction.CommitAsync();
|
||||
}
|
||||
@@ -171,18 +171,23 @@ namespace AyaNova.Biz
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//VALIDATION
|
||||
//
|
||||
private async Task ValidateAsync(NotifySubscription proposedObj)
|
||||
{
|
||||
|
||||
//###############################################################################
|
||||
//todo: validate subscription is valid
|
||||
//perhaps check if customer type user doesn't have non customer notification etc
|
||||
|
||||
//todo: notifysubscriptionbiz Check for duplicate before accepting new / edit in validator
|
||||
//DISALLOW entirely duplicate notifications (down to email address)
|
||||
//USE NAME DUPE CHECK PATTERN BELOW
|
||||
//###############################################################################
|
||||
|
||||
|
||||
|
||||
|
||||
//NOTE: In DB schema only name and serial are not nullable
|
||||
|
||||
|
||||
Reference in New Issue
Block a user