public async Task <bool> DeleteAlbumAsync(Guid albumId) { _logger?.LogInformation("{0} has been retrieved successfully.", MethodBase.GetCurrentMethod().Name); var repoResponse = await _repository.DeleteAlbumAsync(albumId); return(repoResponse); }
public async Task <bool> DeleteAlbumAsync(Guid albumId) { _logger?.LogDebug("'{0}' has been invoked", MethodBase.GetCurrentMethod().DeclaringType); bool result = false; try { _logger?.LogInformation("The DeleteAlbumAsync have been retrieved successfully."); result = await _albumRepository.DeleteAlbumAsync(albumId); return(result); } catch (Exception ex) { _logger?.LogCritical("There was an error on '{0}' invocation: {1}", MethodBase.GetCurrentMethod().DeclaringType, ex); return(false); } }
public async Task DeleteAlbumAsync(int albumId) { var album = await _albumRepository.GetAlbumAsync(albumId); await _albumRepository.DeleteAlbumAsync(album); }