BlendInteractive.ExtendedCategories.Implementations.CategoryRepository.DeleteAssignmentsByContent C# (CSharp) Метод

DeleteAssignmentsByContent() публичный Метод

public DeleteAssignmentsByContent ( EPiServer.Core.ContentReference contentRef, string scope = null ) : void
contentRef EPiServer.Core.ContentReference
scope string
Результат void
        public void DeleteAssignmentsByContent(ContentReference contentRef, string scope = null)
        {
            var assignments = Store.Items<CategoryAssignment>().Where(ca => ca.ContentPage == contentRef && ca.Scope == scope);

            if (assignments.Count() > 0)
            {
                foreach (var assignment in assignments)
                {
                    Store.Delete(assignment);
                }
            }
        }