Exemplo n.º 1
0
        public SimpleResponse Delete(ActorDto dto)
        {
            var response = new SimpleResponse();

            try
            {
                var model = SimpleMapper.Map <ActorDto, ActorViewModel>(dto);
                response = iActorBusiness.Delete(model);
            }
            catch (Exception ex)
            {
                response.ResponseCode    = BusinessResponseValues.InternalError;
                response.ResponseMessage = "Silme iþleminde hata oluþtu.";
                SimpleFileLogger.Instance.Error(ex);
            }

            return(response);
        }
Exemplo n.º 2
0
        public IActionResult DeletePost(int actorId)
        {
            var response = iActorBusiness.Delete(actorId);

            if (response.ResponseCode > 0)
            {
                return(RedirectToAction("Index"));
            }
            else
            {
                ModelState.AddModelError(string.Empty, response.ResponseMessage);
                return(RedirectToAction("Delete", new { actorId }));
            }
        }
Exemplo n.º 3
0
 public IActionResult Delete(int id)
 {
     _business.Delete(id);
     return(NoContent());
 }
Exemplo n.º 4
0
        public IHttpActionResult Delete(int actorId)
        {
            var result = iActorBusiness.Delete(actorId);

            return(Json(result));
        }
Exemplo n.º 5
0
        public SimpleResponse Delete(int actorId)
        {
            var result = iActorBusiness.Delete(actorId);

            return(result);
        }