public ActionResult GetByName(string name) { var tax = currencyService.GetByName(name); var response = new ResponseModel { StatusCode = (int)(tax?.Id > 0 ? HttpStatusCode.Found : HttpStatusCode.NotFound), MessageAr = tax?.Id > 0 ? TaxRes.TaxAlreadyExist : string.Empty }; return(Json(response, JsonRequestBehavior.AllowGet)); }