문제

I need to delete a whole collection of documents in Raven DB. Deleting one by one (documents) is not a wise choice. Is there a way I can do this easily?

도움이 되었습니까?

해결책

You can do a set based operation.

store.DatabaseCommands.DeleteByIndex() to do so

store.DatabaseCommands.DeleteByIndex(
    "Enquiries/MyEnquiryIndexName",
    new IndexQuery { Query = "Id:*", },
    allowStale: false);

Code sample by @Marijin

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top