public async Task <ActionResult <FilmModel> > AddFilm(FilmModel model) { _context.Films.Add(model); await _context.SaveChangesAsync(); return(CreatedAtAction(nameof(GetFilm), new { id = model.ID }, model)); }
public async Task <ActionResult <CustomerModel> > AddCustomer(CustomerModel model) { _context.Customers.Add(model); await _context.SaveChangesAsync(); return(CreatedAtAction(nameof(GetCustomer), new { id = model.ID }, model)); }