public async Task <IActionResult> Update([FromBody] PaymentSheet paymentSheet) { try { _context.Entry(paymentSheet).State = Microsoft.EntityFrameworkCore.EntityState.Modified; _context.SaveChanges(); return(Ok(paymentSheet)); } catch (Exception e) { return(BadRequest(e)); } }
public async Task <IActionResult> Create([FromBody] PaymentSheet paymentSheet) { try { _context.PaymentSheets.Add(paymentSheet); _context.SaveChanges(); return(Ok(paymentSheet)); } catch (Exception e) { return(BadRequest(e)); } }