public async Task <ActionResult> Put(string id, GPARecord model) { var exists = await _dbContext.GPARecords.AnyAsync(f => f.Id == id); if (!exists) { return(NotFound()); } _dbContext.GPARecords.Update(model); await _dbContext.SaveChangesAsync(); return(Ok()); }
public async Task Post(GPARecord model) { await _dbContext.AddAsync(model); await _dbContext.SaveChangesAsync(); }