Example #1
0
        public IActionResult Post([FromBody] Debit debit)
        {
            _rep.Add(debit);
            if (_rep.SaveChanges())
            {
                return(Ok(debit));
            }

            return(BadRequest("Debit not found!"));
        }
        public IActionResult Post(Category category)
        {
            _rep.Add(category);
            if (_rep.SaveChanges())
            {
                return(Ok(category));
            }

            return(BadRequest("Category not found!"));
        }
Example #3
0
        public IActionResult Post(PaymentMethod payment)
        {
            _rep.Add(payment);
            if (_rep.SaveChanges())
            {
                return(Ok(payment));
            }

            return(BadRequest("Payment Method not found!"));
        }