public IActionResult Delete(string id) { var image = this.dataService.GetById(id); if (string.IsNullOrEmpty(image.Id)) { return(this.NotFound()); } imageIoService.DeleteFromDisk(new List <ImageDto> { image }); this.dataService.Delete(id); return(this.Ok()); }