public IActionResult Delete(Guid id) { try { _inventoryRepository.DeleteInventory(id); return(new StatusCodeResult(200)); } catch { return(new StatusCodeResult(400)); } }
public IActionResult DeletePost(int?id) { var obj = _inventoryRepository.GetInventoryById((int)id); if (obj == null) { return(NotFound()); } _inventoryRepository.DeleteInventory(obj); return(RedirectToAction("Index")); }
public IHttpActionResult DeleteInventory(int Id) { try { _inventoryRepository.DeleteInventory(Id); return(Ok()); } catch (Exception ex) { return(InternalServerError(ex)); } }
public async Task <ActionResult <Inventory> > DeleteInventory(long id) { try { var result = await inventoryRepository.DeleteInventory(id); if (result.Value == null) { return(NotFound()); } return(Ok()); } catch (Exception) { return(BadRequest()); } }
public async Task <Unit> Handle(DeleteInventoryCommand request, CancellationToken cancellationToken) { await _repo.DeleteInventory(request); return(default);
public async Task <int> DeleteInventory(Inventory Inventory) { return(await _IInventoryRepository.DeleteInventory(Inventory)); }
public string DeleteInventory(long id) { return(_inventoryRepository.DeleteInventory(id)); }
public IHttpActionResult DeleteInventory(int id) { return(Ok(_inventoryRepository.DeleteInventory(id))); }
public bool DeleteInventory(System.Int32 InventoryId) { return(_iInventoryRepository.DeleteInventory(InventoryId)); }