Revisions: Counting Revisions


  • A document's revisions can be counted using the session.Advanced.Revisions.GetCountFor method.

  • In this page:


GetCountFor

long GetCountFor(string id);
Parameter Type Description
id string ID of the document whose revisions are counted
  • Return Value: long
    The number of revisions for this document

Usage Sample

Get the number of revisions created for a document:

var revisionsCount = session.Advanced.Revisions.GetCountFor(CompanyProfile.Id);
var revisionsCount = await asyncSession.Advanced.Revisions.GetCountForAsync(CompanyProfile.Id);