Trouble deleting items

Vote:
 

Hi,

Having some issue with deleting items from the index. I'm attaching to the ImageVault DeleteFileEvent and was hoping to do a delete of the item from the index. I'm able to run the code for deleting directly twards the id of the document. But as I would rather let Find create its own id (don't know if the fileId in IV is unique) so was hoping to be able to use the method with matching a critera but trying that I can't even compile the code.. Am I missing a using for a helper or?

client.Delete<Document>(e.ID); <--- this works 

client.Delete<Document>(x => x.Id.Match(e.ID));  <--- this doesn't complie

 

#65443
Jan 30, 2013 11:11
Vote:
 

Hi,

That should work (using the EPiServer.Find-namespace). What is the compilation error? Is there an Id property on Document?

 

Regards,

Henrik

#65450
Jan 30, 2013 12:42
Vote:
 

hahaha.. well that was embarrassing wasn't using EPiServer.Find.. 

#65460
Jan 30, 2013 13:50