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)); }
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)); }
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)); }
public IResult Delete(User user) { _userDal.Delete(user); _userImageService.Delete(_userImageService.GetByUserId(user.Id).Data); return(new SuccessResult(Messages.UserDeleted)); }