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