public async Task <ActionResult> Post([FromBody] Client client) { if (ModelState.IsValid) { connection.Client.Add(client); await connection.SaveChangesAsync(); return(Ok(client)); } else { return(NotFound()); } }
public async Task <ActionResult> Post([FromBody] Employee employee) { if (ModelState.IsValid) { connection.Employee.Add(employee); await connection.SaveChangesAsync(); return(Ok(employee)); } else { return(NotFound()); } }
public async Task <ActionResult> Post([FromBody] ProductType productType) { if (ModelState.IsValid) { connection.ProductType.Add(productType); await connection.SaveChangesAsync(); return(Ok(productType)); } else { return(NotFound()); } }
public async Task <ActionResult> Post([FromBody] CartDetail cartDetail) { if (ModelState.IsValid) { connection.CartDetail.Add(cartDetail); await connection.SaveChangesAsync(); return(Ok(cartDetail)); } else { return(NotFound()); } }