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