Querying the “Downloadable goods” library

To query the “Downloadable goods” library you must perform the following:

  1. Get the libraries manager.
    Get an instance of the libraries manager and specify it to use the system libraries provider. The string representation of this provider is “SystemLibrariesProvider”.
  2. Get the library.
    Get the library by either its ID or title. Here are the predefined values of both:
    • ID: e5915e51-707e-4232-9830-68f2800067f8
    • Title: Downloadable goods

    For more information about querying regular libraries, see the Media modules section.

NOTE: When you work with the "Downloadable goods" library, you must always use the libraries manager with the system libraries provider.

Here is a code example:

public static DocumentLibrary GetDownloadableGoodsLibrary()
{
    string providerName = "SystemLibrariesProvider";
    Guid downloadableGoodsId = new Guid("e5915e51-707e-4232-9830-68f2800067f8");
 
    LibrariesManager librariesManager = LibrariesManager.GetManager(providerName);
 
    DocumentLibrary downloadableGoods = librariesManager.GetDocumentLibraries().Where(d => d.Id == downloadableGoodsId).SingleOrDefault();
 
    return downloadableGoods;
}

Next steps

+1-888-365-2779
sales@sitefinity.com

Related topics:

Feedback

How useful is this article?

Tell us more

Submit
Your message was successfully sent.

We appreciate your feedback.

Your message could not be sent.

OK