Esempio n. 1
0
 public IActionResult Delete(Guid id)
 {
     try
     {
         _inventoryRepository.DeleteInventory(id);
         return(new StatusCodeResult(200));
     }
     catch
     {
         return(new StatusCodeResult(400));
     }
 }
Esempio n. 2
0
        public IActionResult DeletePost(int?id)
        {
            var obj = _inventoryRepository.GetInventoryById((int)id);

            if (obj == null)
            {
                return(NotFound());
            }

            _inventoryRepository.DeleteInventory(obj);

            return(RedirectToAction("Index"));
        }
Esempio n. 3
0
        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());
            }
        }
Esempio n. 5
0
        public async Task <Unit> Handle(DeleteInventoryCommand request, CancellationToken cancellationToken)
        {
            await _repo.DeleteInventory(request);

            return(default);
Esempio n. 6
0
 public async Task <int> DeleteInventory(Inventory Inventory)
 {
     return(await _IInventoryRepository.DeleteInventory(Inventory));
 }
Esempio n. 7
0
 public string DeleteInventory(long id)
 {
     return(_inventoryRepository.DeleteInventory(id));
 }
 public IHttpActionResult DeleteInventory(int id)
 {
     return(Ok(_inventoryRepository.DeleteInventory(id)));
 }
Esempio n. 9
0
 public bool DeleteInventory(System.Int32 InventoryId)
 {
     return(_iInventoryRepository.DeleteInventory(InventoryId));
 }