public async Task <IActionResult> Delete(int Id)
        {
            Item item = await ItemDb.GetItemAsync(_context, Id);

            BlobStorageHelper blobStorageHelper = new BlobStorageHelper(_config);

            await blobStorageHelper.DeletePhotoBlob(item.PhotoUrl);

            await blobStorageHelper.DeleteModelBlob(item.ModelUrl);

            await ItemDb.DeleteItemAsync(_context, item);

            return(RedirectToAction("Index", "Home"));
        }
Ejemplo n.º 2
0
 public async Task <IActionResult> Item(int id)
 {
     return(View(await ItemDb.GetItemAsync(_context, id)));
 }