public async Task <IActionResult> PutTemporaryPayAccount(int id, TemporaryPayAccount temporaryPayAccount) { if (id != temporaryPayAccount.Id) { return(BadRequest()); } temporaryPayAccount.Status = true; _context.Entry(temporaryPayAccount).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!TemporaryPayAccountExists(id)) { return(NotFound()); } else { throw; } } return(Ok()); }
public async Task <ActionResult> PostTemporaryPayAccount(TemporaryPayAccount temporaryPayAccount) { temporaryPayAccount.Status = true; _context.TemporaryPayAccount.Add(temporaryPayAccount); await _context.SaveChangesAsync(); return(StatusCode(201)); }