public async Task <IActionResult> DeleteConfirmed(int id)
        {
            var color = await _colorRepository
                        .GetByIdAsync(id);

            await _colorRepository
            .DeleteAsync(color);

            return(RedirectToAction(nameof(Index)));
        }
Beispiel #2
0
        public async Task <bool> Handle(DeleteColorCommandRequest request, CancellationToken cancellationToken)
        {
            await _colorRepository.DeleteAsync(request.ColorId);

            return(true);
        }
Beispiel #3
0
 /// <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);