public ActionResult <FeeVM> Create(FeeVM feeVM) { if (!ModelState.IsValid) { return(BadRequest()); } var result = _feeSer.Add(feeVM); if (result == null) { return(Problem("Can't add new fee")); } return(CreatedAtAction(nameof(Get), new { id = result.Id }, result)); }
public ActionResult AddFee(Fee fee) { return(Json(feeService.Add(fee))); }