Last active
November 30, 2022 12:56
SF_10.1, SF_10.2, SF_11.0, SF_11.1, SF_11.2, SF_12.0, SF_12.1, SF_12.2, SF_13.0, SF_13.1, SF_13.2, SF_13.3, SF_14.3 - https://docs.sitefinity.com/for-developers-delete-video-libraries
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Linq; | |
using Telerik.Sitefinity.Libraries.Model; | |
using Telerik.Sitefinity.Modules.Libraries; | |
namespace SitefinityWebApp | |
{ | |
public class DeleteVideoLibraries_DeleteAllVideoLibrariesNativeAPI | |
{ | |
private void DeleteAllVideoLibrariesNativeAPI() | |
{ | |
LibrariesManager manager = LibrariesManager.GetManager(); | |
var videoLibraries = manager.GetVideoLibraries().ToList(); | |
foreach (VideoLibrary library in videoLibraries) | |
{ | |
manager.DeleteVideoLibrary(library); | |
} | |
manager.SaveChanges(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment