public async Task <WeatherForecast> AddAsync(WeatherForecast entity, CancellationToken ct = default) { _context.WeatherForecast.Add(entity); await _context.SaveChangesAsync(ct); return(entity); }
public async Task <Customer> AddAsync(Customer newCustomer, CancellationToken ct = default) { _context.Customer.Add(newCustomer); await _context.SaveChangesAsync(ct); return(newCustomer); }
public async Task <Invoice> AddAsync(Invoice newInvoice, CancellationToken ct = default) { _context.Invoice.Add(newInvoice); await _context.SaveChangesAsync(ct); return(newInvoice); }
public async Task <MediaType> AddAsync(MediaType newMediaType, CancellationToken ct = default) { _context.MediaType.Add(newMediaType); await _context.SaveChangesAsync(ct); return(newMediaType); }
public async Task <Venda> AddAsync(Venda entity, CancellationToken ct = default) { _context.Venda.Add(entity); await _context.SaveChangesAsync(ct); return(entity); }
public async Task <Album> AddAsync(Album newAlbum, CancellationToken ct = default) { _context.Album.Add(newAlbum); await _context.SaveChangesAsync(ct); return(newAlbum); }
public async Task <Genre> AddAsync(Genre newGenre, CancellationToken ct = default) { _context.Genre.Add(newGenre); await _context.SaveChangesAsync(ct); return(newGenre); }
public async Task <Artist> AddAsync(Artist newArtist, CancellationToken ct = default) { _context.Artist.Add(newArtist); await _context.SaveChangesAsync(ct); return(newArtist); }
public async Task <Track> AddAsync(Track newTrack, CancellationToken ct = default) { _context.Track.Add(newTrack); await _context.SaveChangesAsync(ct); return(newTrack); }
public async Task <Employee> AddAsync(Employee newEmployee, CancellationToken ct = default) { _context.Employee.Add(newEmployee); await _context.SaveChangesAsync(ct); return(newEmployee); }
public async Task <IActionResult> PostDatabaseRecordAsync(DatabaseRecord record) { await _context.DatabaseRecords.AddAsync(record); await _context.SaveChangesAsync(); return(Ok(record)); }