public async Task <IActionResult> DeleteConfirmed(int id) { var color = await _colorRepository .GetByIdAsync(id); await _colorRepository .DeleteAsync(color); return(RedirectToAction(nameof(Index))); }
public async Task <bool> Handle(DeleteColorCommandRequest request, CancellationToken cancellationToken) { await _colorRepository.DeleteAsync(request.ColorId); return(true); }
/// <summary> /// Remove specified color objects from file /// </summary> /// <param name="filePath"></param> /// <param name="name"></param> /// <returns></returns> public async Task DeleteAsync(string filePath, string name) => await _colorRepository.DeleteAsync(filePath, name);