public async Task <ActionResult <Trip> > PostTrip(Trip trip) { _context.Trips.Add(trip); await _context.SaveChangesAsync(); return(CreatedAtAction("GetTrip", new { id = trip.Id }, trip)); }
public async Task <ActionResult <Line> > PostLine(Line line) { _context.Lines.Add(line); await _context.SaveChangesAsync(); return(CreatedAtAction("GetLine", new { id = line.Id }, line)); }