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()); }
public IActionResult Delete(int id) { _artPostRepository.DeleteArtPost(id); return(Ok()); }