Exemple #1
0
        public IActionResult DeleteUserProfileAndPosts(int id)
        {
            List <ArtPost> artPosts = _artPostRepository.GetAllArtPostsByUser(id);

            _userProfileRepository.DeleteUserProfile(id);
            foreach (ArtPost artPost in artPosts)
            {
                _artPostRepository.DeleteArtPost(artPost.Id);
            }
            return(Ok());
        }
Exemple #2
0
 public IActionResult Delete(int id)
 {
     _artPostRepository.DeleteArtPost(id);
     return(Ok());
 }