public IActionResult Detail(int actorId)
        {
            var response = iActorBusiness.Read(actorId);

            if (response.Data == null || response.ResponseCode < 1)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.NotFound));
            }

            return(View(response.Data, JsonRequestBehavior.AllowGet));
        }
Example #2
0
        public SimpleResponse <ActorDto> Read(int actorId)
        {
            var response = new SimpleResponse <ActorDto>();

            try
            {
                var resp        = iActorBusiness.Read(actorId);
                var isNullOrDef = resp.Data == null || resp.Data == default(ActorViewModel);
                response.ResponseCode    = isNullOrDef ? BusinessResponseValues.NullEntityValue : 1;
                response.RCode           = resp.RCode;
                response.ResponseMessage = resp.ResponseMessage;
                if (!isNullOrDef)
                {
                    response.Data = SimpleMapper.Map <ActorViewModel, ActorDto>(resp.Data);
                }
            }
            catch (Exception ex)
            {
                response.ResponseCode    = BusinessResponseValues.InternalError;
                response.ResponseMessage = "Okuma iþleminde hata oluþtu.";
                SimpleFileLogger.Instance.Error(ex);
            }

            return(response);
        }
        public IHttpActionResult Detail(int actorId)
        {
            var modelResult = iActorBusiness.Read(actorId);

            return(Json(modelResult));
        }
Example #4
0
        public SimpleResponse <ActorViewModel> Detail(int actorId)
        {
            var response = iActorBusiness.Read(actorId);

            return(response);
        }