Looking for a way to find a document registered in Sharepoint. I can find document in a documet library or list by following code.
SPSite oSPSite = new SPSite(_serverUrl); SPWeb oSPWeb = oSPSite.OpenWeb(); SPList oSPList; SPListItemCollection oSPListItemCollection; oSPList = oSPWeb.Lists["Listname"]; SPListItem listItem = null; listItem = oSPList.GetItemByUniqueId(new Guid(spGuid)); But do i need to iterate trough all list if i dont know in which list the document is registered or is there a more efficient way.