public ActionResult <Users> Put([FromRoute] int usersId, [FromBody] Users updatedData) { var users = _db.Users.FirstOrDefault(user => user.Id == usersId); users.CompanyName = updatedData.CompanyName; _db.SaveChanges(); return(updatedData); }
public ActionResult Post([FromBody] Models.Inventories inventory) { _db.Inventories.Add(inventory); _db.SaveChanges(); return(Ok(inventory)); }
public ActionResult Post([FromBody] Models.Items item) { _db.Items.Add(item); _db.SaveChanges(); return(Ok(item)); }
public ActionResult Post([FromBody] Models.Reports report) { _db.Reports.Add(report); _db.SaveChanges(); return(Ok(report)); }