public ActionResult Detail(int languageId) { var response = iLanguageBusiness.Read(languageId); if (response.Data == null || response.ResponseCode < 1) { return(new HttpStatusCodeResult(HttpStatusCode.NotFound)); } return(View(response.Data)); }
public SimpleResponse <LanguageDto> Read(int languageId) { var response = new SimpleResponse <LanguageDto>(); try { var resp = iLanguageBusiness.Read(languageId); var isNullOrDef = resp.Data == null || resp.Data == default(LanguageViewModel); response.ResponseCode = isNullOrDef ? BusinessResponseValues.NullEntityValue : 1; response.RCode = resp.RCode; response.ResponseMessage = resp.ResponseMessage; if (!isNullOrDef) { response.Data = SimpleMapper.Map <LanguageViewModel, LanguageDto>(resp.Data); } } catch (Exception ex) { response.ResponseCode = BusinessResponseValues.InternalError; response.ResponseMessage = "Okuma iþleminde hata oluþtu."; SimpleFileLogger.Instance.Error(ex); } return(response); }
public SimpleResponse <LanguageViewModel> Detail(int languageId) { var response = iLanguageBusiness.Read(languageId); return(response); }
public IHttpActionResult Detail(int languageId) { var modelResult = iLanguageBusiness.Read(languageId); return(Json(modelResult)); }