public IActionResult CreateFee(FeeInsert Fee) { try { return(new JsonResult(FeeBAL.CreateFee(Fee))); } catch (Exception ex) { return(StatusCode(StatusCodes.Status500InternalServerError, "Failed to create Fee")); } }
public Fee CreateFee(FeeInsert fee) { using (SqlConnection connection = new SqlConnection(DefaultConnection)) { DynamicParameters p = new DynamicParameters(); p.Add("businessid", fee.BusinessID); p.Add("feetype", fee.FeeType); p.Add("description", fee.Description); p.Add("feeamount", fee.FeeAmount); Fee result = connection.Query <Fee>("spCreateFee", p, commandType: CommandType.StoredProcedure).Single(); return(result); } }
public Fee CreateFee(FeeInsert fee) { return(FeeDAL.CreateFee(fee)); }