/// <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); }
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); }
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); }
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()); }
public async Task DeleteAsync(long id) { await _accountBalanceDeleteService.DeleteAsync(id); }
public async Task DeleteAsync(long id) { await _clientDelete.DeleteAsync(id); }
public async Task <IActionResult> Delete([FromServices] IDeleteService deleteService, Guid id) { await deleteService.DeleteAsync(id); return(NoContent()); }
public async Task DeleteAsync(string id) { await _deleteService.DeleteAsync(id, Session, _sessionkey); }