コード例 #1
0
        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));
        }
コード例 #2
0
 public ActionResult AddFee(Fee fee)
 {
     return(Json(feeService.Add(fee)));
 }