public IHttpActionResult Delete(int id) { var result = _movieStore.Delete(id); if (result != null) { return(Ok(result)); } return(NotFound()); }
public async Task <ActionResult> Delete(long id) { // Delete book cover image from Cloud Storage if ImageUrl exists string imageUrlToDelete = _store.Read((long)id).ImageUrl; if (imageUrlToDelete != null) { await _imageUploader.DeleteUploadedImage(id); } _store.Delete(id); return(RedirectToAction("Index")); }