public async Task SaveSendAsync(Send send)
 {
     if (send.Id == default(Guid))
     {
         await _sendRepository.CreateAsync(send);
     }
     else
     {
         send.RevisionDate = DateTime.UtcNow;
         await _sendRepository.UpsertAsync(send);
     }
 }
Exemple #2
0
        public async Task SaveSendAsync(Send send)
        {
            // Make sure user can save Sends
            await ValidateUserCanSaveAsync(send.UserId);

            if (send.Id == default(Guid))
            {
                await _sendRepository.CreateAsync(send);

                await _pushService.PushSyncSendCreateAsync(send);
            }
            else
            {
                send.RevisionDate = DateTime.UtcNow;
                await _sendRepository.UpsertAsync(send);

                await _pushService.PushSyncSendUpdateAsync(send);
            }
        }