public async Task <IActionResult> ConfirmDeleteFromGoggles_list(int?id) { if (id != null) { Goggle find_part = await PartsContext.Goggles.FirstOrDefaultAsync(p => p.Id == id); return(DeleteView(find_part, "Goggles_list")); } return(NotFound()); }
public async Task <IActionResult> DeleteGoggles_list(int?id) { if (id != null) { Goggle find_part = new Goggle { Id = id.Value }; await DeletePart(find_part); return(RedirectToAction("Index")); } return(NotFound()); }