public ActionResult Post([FromBody] Orderss Orderss) { if (ModelState.IsValid) { return(BadRequest(ModelState)); } db.Ordersses.Add(Orderss); db.SaveChanges(); return(CreatedAtAction("Post", Orderss)); }
public ActionResult Post([FromBody] Department Department) { if (ModelState.IsValid) { return(BadRequest(ModelState)); } db.Departments.Add(Department); db.SaveChanges(); return(CreatedAtAction("Post", Department)); }