Esempio n. 1
0
        // POST: api/Kategori
        public IHttpActionResult Post(Barang barang)
        {
            BarangDAL barangDAL = new BarangDAL();

            try
            {
                barangDAL.Create(barang);
                return(Ok());
            }
            catch (Exception ex)
            {
                return(BadRequest(ex.Message));
            }
        }