public async Task <ActionResult <Movie> > PostMovie(Movie movie) { _context.Movies.Add(movie); await _context.SaveChangesAsync(); return(CreatedAtAction("GetMovie", new { id = movie.Id }, movie)); }
public async Task <ActionResult <Customer> > PostCustomer(Customer customer) { _context.Customers.Add(customer); await _context.SaveChangesAsync(); return(CreatedAtAction("GetCustomer", new { id = customer.Id }, customer)); }