public static GetDatabaseCommands ( this session ) : IDatabaseCommands | ||
session | this | The Raven advanced session. |
return | IDatabaseCommands |
public static IDatabaseCommands GetDatabaseCommands(this IAdvancedDocumentSessionOperations session)
{
// Note - We must cast to a DocumentSession to get the correct DatabaseCommands instance.
// session.DocumentStore.DatabaseCommands will not necessarily point at the same database
// that the session was opened for. Hence the usefulness of this extension method.
return ((DocumentSession) session).DatabaseCommands;
}