public IActionResult Delete(UserImage userImage)
        {
            var result = _userImageService.Delete(userImage);

            if (result.Success)
            {
                return(Ok(result));
            }
            return(BadRequest());
        }
        public IActionResult Delete([FromForm(Name = "Id")] int Id)
        {
            var forDelete = _userImageService.GetById(Id).Data;
            var result    = _userImageService.Delete(forDelete);

            if (result.Success)
            {
                return(Ok(result));
            }
            return(BadRequest(result));
        }
Example #3
0
        public IActionResult Delete(int id)
        {
            var userImage = _userImageService.GetById(id).Data;
            var result    = _userImageService.Delete(userImage);

            if (result.Success)
            {
                return(Ok(result));
            }
            return(BadRequest(result));
        }
Example #4
0
        public IActionResult Add([FromForm(Name = ("id"))] int id)
        {
            var userImage = _userImageService.GetById(id).Data;
            var result    = _userImageService.Delete(userImage);

            if (result.Success)
            {
                return(Ok(result));
            }

            return(BadRequest(result));
        }
Example #5
0
 public IResult Delete(User user)
 {
     _userDal.Delete(user);
     _userImageService.Delete(_userImageService.GetByUserId(user.Id).Data);
     return(new SuccessResult(Messages.UserDeleted));
 }