public async Task DeleteConfigGenericItemAsync(DeleteConfigGenericItemDto request) { _logger.LogDebug($"Deleting config generic item with group Id {request.GroupId} and Id {request.Id}"); var entity = await _dbContext.ConfigGenericItems.SingleOrDefaultAsync(x => x.GroupId == request.GroupId && x.Id == request.Id); if (entity != null) { _dbContext.Remove(entity); await _dbContext.SaveChangesAsync(); } else { _logger.LogError($"Cannot delete config generic item with group Id {request.GroupId} and Id {request.Id}"); } }
public async Task DeleteConfigGenericItemAsync([FromBody] DeleteConfigGenericItemDto request) { await _configGenericItemService.DeleteConfigGenericItemAsync(request); }