Beispiel #1
0
        public async Task <IActionResult> PutSuppliers(int id, data.Suppliers suppliers)
        {
            if (id != suppliers.SupplierID)
            {
                return(BadRequest());
            }


            try
            {
                new bussiness.Suppliers(_context).Updated(suppliers);
            }
            catch (Exception ee)
            {
                throw ee;
            }

            return(NoContent());
        }
Beispiel #2
0
 public async Task <ActionResult <data.Suppliers> > PostSuppliers(data.Suppliers suppliers)
 {
     new bussiness.Suppliers(_context).Insert(suppliers);
     return(CreatedAtAction("GetSuppliers", new { id = suppliers.SupplierID }, suppliers));
 }