public async Task <IActionResult> PutPayFees(int id, PayFees payFees) { if (id != payFees.PayFeesId) { return(BadRequest()); } _context.Entry(payFees).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!PayFeesExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <ActionResult <PayFees> > PostPayFees(PayFees payFees) { var data = _context.Database.ExecuteSqlCommand("spPayFees @StudentName ,@Fees ", new SqlParameter("@StudentName", payFees.StudentName), new SqlParameter("@Fees", payFees.Fees) ); // _context.PayFee.Add(payFees); //await _context.SaveChangesAsync(); return(Ok(data)); // return CreatedAtAction("GetPayFees", new { id = payFees.PayFeesId }, payFees); }