Exemplo n.º 1
0
        /// <inheritdoc />
        public virtual async Task <OperationContainer> ProcessAsync(OperationContainer operation, CancellationToken cancellationToken)
        {
            ArgumentGuard.NotNull(operation, nameof(operation));

            var id = (TId)operation.Resource.GetTypedId();
            await _service.DeleteAsync(id, cancellationToken);

            return(null);
        }
Exemplo n.º 2
0
        public async Task DeleteAsync(INoteIdentity identity)
        {
            var connectedReminders = from item in await _noteReminderGetService.GetAsync()
                                         where item.LinkedNote.Id == identity.Id select item;

            foreach (var i in connectedReminders)
            {
                await _noteReminderDeleteService.DeleteAsync(new NoteReminderIdentityModel(i.Id));
            }
            await _dataAccessor.DeleteAsync(identity);
        }
Exemplo n.º 3
0
        public virtual async Task <IActionResult> DeleteAsync(TId id)
        {
            _logger.LogTrace($"Entering {nameof(DeleteAsync)}('{id}).");

            if (_delete == null)
            {
                throw new RequestMethodNotAllowedException(HttpMethod.Delete);
            }
            await _delete.DeleteAsync(id);

            return(NoContent());
        }
        /// <summary>
        /// Deletes an existing resource.
        /// Example: DELETE /articles/1 HTTP/1.1
        /// </summary>
        public virtual async Task <IActionResult> DeleteAsync(TId id, CancellationToken cancellationToken)
        {
            _traceWriter.LogMethodStart(new { id });

            if (_delete == null)
            {
                throw new RequestMethodNotAllowedException(HttpMethod.Delete);
            }
            await _delete.DeleteAsync(id, cancellationToken);

            return(NoContent());
        }
        /// <inheritdoc />
        public virtual async Task <OperationContainer> ProcessAsync(OperationContainer operation,
                                                                    CancellationToken cancellationToken)
        {
            if (operation == null)
            {
                throw new ArgumentNullException(nameof(operation));
            }

            var id = (TId)operation.Resource.GetTypedId();
            await _service.DeleteAsync(id, cancellationToken);

            return(null);
        }
Exemplo n.º 6
0
        public virtual async Task <IActionResult> DeleteAsync(TId id)
        {
            if (_delete == null)
            {
                throw Exceptions.UnSupportedRequestMethod;
            }
            var wasDeleted = await _delete.DeleteAsync(id);

            if (!wasDeleted)
            {
                return(NotFound());
            }
            return(NoContent());
        }
Exemplo n.º 7
0
 public async Task DeleteAsync(long id)
 {
     await _accountBalanceDeleteService.DeleteAsync(id);
 }
Exemplo n.º 8
0
 public async Task DeleteAsync(long id)
 {
     await _clientDelete.DeleteAsync(id);
 }
Exemplo n.º 9
0
        public async Task <IActionResult> Delete([FromServices] IDeleteService deleteService, Guid id)
        {
            await deleteService.DeleteAsync(id);

            return(NoContent());
        }
Exemplo n.º 10
0
 public async Task DeleteAsync(string id)
 {
     await _deleteService.DeleteAsync(id, Session, _sessionkey);
 }