Check if page is deleted

Vote:
 

Hi,

This question has been asked and answered before (here: http://world.episerver.com/Modules/Forum/Pages/Thread.aspx?id=38268) but in Episerver 7 it seems like PageCoreData is deprecated. So what is the best/correct way to check if pages has been deleted. I really dont want to use the try catch method....

#75972
Oct 14, 2013 15:30
Vote:
 

This should work:

            var mappedContent = PermanentLinkMapper.Instance.Find(someContentReference);
            if (mappedContent == null)
            {
                // does not exist
            }

    

#75974
Oct 14, 2013 17:35
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.