public IActionResult Buyitem(PurchaseHistory obj) { try { _repo.Buyitem(obj); return(Ok()); } catch (Exception e) { return(NotFound(e.InnerException.Message)); } }
public IActionResult Buyitem(PurchaseHistory obj) { try { _repo.Buyitem(obj); return(Ok()); } catch (Exception ex) { return(Content(ex.InnerException.Message)); } }