Beispiel #1
0
        public async Task <IActionResult> PutCategories(int id, data.Categories Categories)
        {
            if (id != Categories.CategoryId)
            {
                return(BadRequest());
            }


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

            return(NoContent());
        }
Beispiel #2
0
 public async Task <ActionResult <data.Categories> > PostCategories(data.Categories Categories)
 {
     new bussiness.Categories(_context).Insert(Categories);
     return(CreatedAtAction("GetCategories", new { id = Categories.CategoryId }, Categories));
 }